Here, I've tried to create a regular expression that matches one particular string:
#This is the string that the regex is intended to match
theString = "..!-+!)|(!+-!.."
print(re.compile(theString).match(theString))
This produces an error instead of matching the string:
raise error, v # invalid expression
sre_constants.error: unbalanced parenthesis
Is there any way to generate a regular expression that matches just one specific string, like this one?