syntax
syntax copied to clipboard
Tokenizer: support beginning of a string ^ in actual regexp
Currently tokenizer automatically add ^ at the beginning of all regexes. Some regexes, e.g. lookbehind assertions, can use it explicitly:
'/(?<=^[[:space:]])A(?=[[:space:]])/'
In this case we don't need to append the ^.
Note: this doesn't work:
'/^(?<=[[:space:]])A(?=[[:space:]])/'