You can never go down the drain...
Fredrik Lundh
effbot at telia.com
Mon Sep 25 18:12:21 EDT 2000
Phlip wrote:
> C> I'd search the bugbase for this, to see if 1.6 had it, but I have no idea
> how to search for things like [] and \1 and sub from a web page.
it's bug 114660
> 4> Just for curiosity, any re workaround that's obvious to all you
> expression regulars? (Besides a loop statement?)
here's the patch (the line numbers might differ slightly from
your copy)
Index: sre_parse.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** sre_parse.py 2000/09/02 11:03:33 1.33
--- sre_parse.py 2000/09/24 14:46:19 1.34
***************
*** 635,639 ****
group = _group(this, pattern.groups+1)
if group:
! if (not s.next or
not _group(this + s.next, pattern.groups+1)):
code = MARK, int(group)
--- 635,639 ----
group = _group(this, pattern.groups+1)
if group:
! if (s.next not in DIGITS or
not _group(this + s.next, pattern.groups+1)):
code = MARK, int(group)
</F>
More information about the Python-list
mailing list