qntm / greenery

Regular expression manipulation library
http://qntm.org/greenery
MIT License
311 stars 40 forks source link

support regex not containing word #111

Closed tooptoop4 closed 3 weeks ago

tooptoop4 commented 3 weeks ago

for example "^topic(?!.*bob).*" is accepted in java

qntm commented 3 weeks ago

This is an example of a lookaround assertion. This kind of structure is not strictly regular and can't be converted into a finite state machine, so unfortunately it's not possible for greenery to support it.