improved a few regex assertions to escape parentheses