In a PHP script, what regex should I use to check for mismatched parentheses in a string? Things that I want to allow include:
Agree with the fact that this is impossible with a REGEX. You could do the following, though: