Fix regular expressions by adding missing parentheses