I have a python template engine that heavily uses regexp. It uses concatenation like:
re.compile( regexp1 + \"|\" + regexp2 + \"*|\" + regexp3 + \"+\" )
<
This shouldn't match anything:
re.compile('$^')
So if you replace regexp1, regexp2 and regexp3 with '$^' it will be impossible to find a match. Unless you are using the multi line mode.
After some tests I found a better solution
re.compile('a^')
It is impossible to match and will fail earlier than the previous solution. You can replace a with any other character and it will always be impossible to match