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

We need a simpler regex format. One that allows easy searching and replacing in source code. Of course, some IDE's already to that pretty well, but I'd like to be able to do it from the command line with a stand alone tool I can easily use in scripts.

The simplest thing I know that is able to do that is coccinelle, but even coccinelle is not handy enough.



I think what we really need is one regex format. You have POSIX, PCRE, and also various degrees of needing to double-escape the slashes to get past whatever language you're using the regex in. Always adds a large element of guesswork even when you are familiar with regular expressions.



Yeah I know all these dialects, the question is, which is the one I'm supposed to use for (this tool)?


> I think what we really need is one regex format.

See https://xkcd.com/927/ How standards proliferate


It's not perfect but I like sed for this.




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

Search: