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

> In more general terms, if a regex is complicated enough that something like this seems to make sense, the problem is that your regex is too complicated, and you should fix that.

I disagree. There is no such thing as a "complicated regex" in itself; it's all the same to the underlying engine. It's the maintenance of the regex that's the problem. You could, for instance, compile many small, maintainable patterns into a (technically) complicated regex with guarantees it will evaluate as expected—which is one possible way the outlined SQL approach could work. Don't confuse process with technology.




> it's all the same to the underlying engine

So what you're saying is that as long as I have a PCRE library linked into my brain, there's no problem. Gotcha.


If you're compiling the regex, there's no need to read it. Just understand the compiler. I'm not sure how what you've said related to my comment.


What do you do when the compiler breaks, or fails to implement something you need?




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

Search: