list of regex special characters

2010-11-28 Thread goldtech
I am looking for a list of special character in python regular expressions that need to be escaped if you want their literal meaning. I searched and can not find the list. Any help appreciated. -- http://mail.python.org/mailman/listinfo/python-list

Re: list of regex special characters

2010-11-28 Thread Ben Finney
goldtech goldt...@worldpost.com writes: I am looking for a list of special character in python regular expressions that need to be escaped if you want their literal meaning. You can avoid caring about that by using ‘re.escape’, which escapes any characters in its input character that are not

Re: list of regex special characters

2010-11-28 Thread Tim Chase
On 11/28/2010 05:58 PM, goldtech wrote: I am looking for a list of special character in python regular expressions that need to be escaped if you want their literal meaning. I searched and can not find the list. Any help appreciated. Trust the re module to tell you: import re chars =

Re: list of regex special characters

2010-11-28 Thread Ben Finney
Tim Chase python.l...@tim.thechases.com writes: On 11/28/2010 05:58 PM, goldtech wrote: I am looking for a list of special character in python regular expressions that need to be escaped if you want their literal meaning. Trust the re module to tell you: import re chars = [chr(i)