Positive lookbehinds not working
john5634 opened this issue · 3 comments
john5634 commented
Hello!
Trying to use positive lookbehinds with XRegExp and it does not seem to work.
Is this known?
TRYING TO MATCH: "Empire Burlesque"
WITH:
REGEX:
(?<=<TITLE>)(.*)(?=</TITLE>)
STRING:
slevithan commented
What browser are you testing it with? Lookbehind should work if and only if you're using a browser / JavaScript runtime that supports regex lookbehind natively.
john5634 commented
We are using firefox 67. Which does not support Lookbehinds. We were hoping that XRegExp would enable them?
slevithan commented
No, lookbehind is not something XRegExp provides on its own.
For your regex and example string, it seems simple enough to use a regex like this instead:
/<TITLE>(.*?)</TITLE>/Then just reference the value in capturing group 1, rather than the whole match.