slevithan/xregexp

Lookbehind

ShimShamSam opened this issue · 1 comments

Any chance of getting negative/positive lookbehind implemented? This might be a big undertaking considering it isn't natively supported by browsers.

Unfortunately it is not possible to implement fully accurate backtracking within emulated lookbehind. This will require native lookbehind support.

However, see https://gist.github.com/slevithan/2387872 which shows how to extend XRegExp to add support for infinite-length leading lookbehind.