Hacker News new | past | comments | ask | show | jobs | submit login

If you are really using a state machine and every match in the regex is at the end of the haystack, then you can reverse the state machine and use the same algorithm you described in reverse. :-)

(Rust's regex engine does this.)




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

Search: