RegEx question
Tim Chase
python.list at tim.thechases.com
Thu Oct 4 16:08:51 EDT 2007
[sigh...replying to my own post]
> However, things to try:
>
> - sometimes the grouping parens need to be escaped with "\"
>
> - sometimes "\w" isn't a valid character class, so use the
> long-hand variant of something like "[a-zA-Z0-9_]]
>
> - sometimes the "+" is escaped with a "\"
>
> - if you don't use raw strings, you'll need to escape your "\"
> characters, making each instance "\\"
just to be clear...these are some variants you may find in
non-python regexps (or in python regexps if you're not using raw
strings)
-tkc
More information about the Python-list
mailing list