Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Doesn't it have to exhibit "correctly matching strings return faster ... on a per-character or other tiny chunk basis" in order to work the match towards correctness?


Yes, and it will indeed try by all means to exhibit that behavior -- unless if it's some contrived regex designed to counter this.

The key word here is "short cirtuit" the match, and any regex engine worth its salt will try to do that as much as possible, tranforming the regex to the faster FSM it can.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: