asottile-archive / textmate-highlight

syntax highlight engine written for babi
MIT License
1 stars 0 forks source link

how to handle (?<=^|\s) in regexes #4

Closed asottile closed 4 years ago

asottile commented 4 years ago

(?<=1|23) can be transformed into (?:(?<=1)|(?<=23))

asottile commented 4 years ago

here's another example: (?<!\\w|-|[^\\)]\\.)

I think this one can be transformed into (?<!\\w)(?<!-)(?<![^\\)]\\.)

asottile commented 4 years ago

via ad5640d8a17d69d7807bc158cf298f3428010829