in reply to Re: RFC: Perl regex to validate arithmetic expressions
in thread RFC: Perl regex to validate arithmetic expressions

Since 5.10, Perl regular expressions can match anything that's matched by a context-free grammar - and then some (backreferences add even more power). Matching balanced parenthesis is easy in 5.10 and later: /^(\((?1)*\))$/.