syntax icon indicating copy to clipboard operation
syntax copied to clipboard

Tokenizer: support lookbehind assertions

Open DmitrySoshnikov opened this issue 8 years ago • 0 comments

Currently lookbehind assertions do not work, since ^ is inserted at the beginning of the whole regexp (tokenizer applies all regexes from the beginning of the rest of a string).

This should match foo ("foo" surrounded by spaces):

(?<= )foo(?= )

This incorrectly transformed to:

^(?<= )foo(?= )

While should be:

(?<=^ )foo(?= )

DmitrySoshnikov avatar Feb 12 '17 03:02 DmitrySoshnikov