Fixed regex parenthesis error.

Previously, when regex were parsed, every parenthesis in it
would cause it to terminate the line in the middle of a string,
breaking the validity of the resultant DSM. This has been fixed.