problem with regex

abcd codecraig at gmail.com
Fri Jul 28 09:08:50 EDT 2006


well thanks for the quick replies, but now my regex doesn't work.

[code]
import re
p = re.compile(r'[A-Za-z]:\\([^/:\*?"<>\|])*')

x = p.match("c:\test")
[/code]

x is None

any ideas why?  i escape the back-slash, the asterisk *, and the PIPE |
....b/c they are regex special characters.




More information about the Python-list mailing list