Error:Got error 'parentheses not balanced' from regexp