I'm using the Python module re to write regular expressions for lexical analysis. I've been looking for a comprehensive list of which special characters must be escaped in order to be recognized by the regex to no avail. Can someone please point me to an exhaustive list?
The line in the current regex I'm writing that's giving me trouble is:
[\|\^&\+-%\*\/=!>]
I'd like it to recognize the characters: |^&+-%*/=!>
Have I not escaped something I should have?
After the opening square bracket the only special characters are -
, ^
and ]
:
[|\^&+\-%*/=!>]
You can find the list of special characters here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With