News for hackers. Stuff that matters.
Re:Regular Expression Matching can be Ugly and Slow by MattJ100 on Sunday March 14, 2010 @09:18PM (#1191729)
(I shan't confess this is partly an excercise to see how deep HN will nest comments)

Lua is interesting in that instead of using traditional regex it comes with its own "pattern" matching - the implementation is much cleaner than most regex implementations. See http://www.lua.org/pil/20.1.html for a bit more info.

I reply to this comment because Lua patterns actually have an operator to match balanced parentheses (or any pair of characters): %b()

Also worth a look if you're feeling bored of regex are PEGs, which leads me nicely onto: http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html

(and finally yes, everything I do or speak about does tend to revolve around Lua)

There are no comments on this comment yet.