It does matter, because string literals can contain closing parentheses, in which case your regex will not match it all.