Right idea, wrong bolding. It's misleading on the OP's part,but that quoted statement is not a syntax error. The trailing slash closes the regex and the right paren properly terminates the if clause. The right paren is not matching the left brace - that left brace is part of the regex and is treated as a literal.
in reply to Re^3: regex testing for multiple values
in thread regex testing for multiple values