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

Update: I tested it out a little more here.

https://github.com/oilshell/blog-code/blob/master/regular-la...

Basically everything you want with regard to greedy-nongreedy can be done through automata-based engines.

They jump through a lot of hoops to make them work!

However I would also argue that when you're using them, you're doing it as a performance hack in a Perl-style regex engine. In an automata-based engine, you can just write

    /x*/
    /(x*)/
and it's what you want, and it runs fast.


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

Search: