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

"Why regex still exists?"

Is there an alternative that is clearly superior?



Your mileage may vary, but to my taste, the lpeg flavor of Parsing Expression Grammars is clearly superior.

It uses operator overloading to build patterns from component parts. I don't think anything can replace the terseness of regex for command line use, or vim searching, cases like that.

But for a program, give me lpeg every time.




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

Search: