attempting to fix regex unbalanced parenthesis issue