re/sre woes with Python 2.0
Jonathan Epstein
Jonathan_Epstein at nih.gov
Wed Jul 17 13:20:59 EDT 2002
Hi,
Can someone please explain why the following line produces a
regular-expression compilation error with Python 2.0, but not with Python
1.5? Is this fixed in any later versions, and/or can you describe how to
adjust the RE to make Python 2.0 happy?
regexp2 = re.compile
(r"(?s)STATE\s*\"([^\"]*)\"\s*(\w*)\s*(\w*)?\s*{(.*?)\n[
\t]*}(?=\s*(?:$|STATE))")
TIA,
- Jonathan
More information about the Python-list
mailing list