News for hackers. Stuff that matters.
Re:Hiring programmers (2005) by philwelch on Tuesday July 14, 2009 @01:15PM (#704103)
Which is interesting, as a proper regular expression is incapable of testing for a parens match. The set of strings with properly matched parens is a context-free language, not a regular language. But modern "regex" engines are capable of matching non-regular languages, and iterative regex-based substitutions (as his client-side code does--his server-side code is equivalent to the stack-based approach) can approximate the effect.
Re:Hiring programmers (2005) by cedsav on Tuesday July 14, 2009 @01:22PM (#704115)
while he's using regex, it's hardly a regex-based solution. He's just striping out characters and parenthesis pairs