commit | 6fa0c5a452ea935977b283955a1d49e5e23d97dc | [log] [tgz] |
---|---|---|
author | Gustavo Niemeyer <gustavo@niemeyer.net> | Wed Sep 14 08:54:39 2005 +0000 |
committer | Gustavo Niemeyer <gustavo@niemeyer.net> | Wed Sep 14 08:54:39 2005 +0000 |
tree | 2a192ec77d57f5f9e6be0e742fbcd4dc70a98005 | |
parent | 0c55f2946b559bd5f6dec457accdc2f2c9c55d3a [diff] [blame] |
Bug #1202493: Fixing SRE parser to handle '{}' as perl does, rather than considering it exactly like a '*'.
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py index 33b399e..319bf43 100644 --- a/Lib/sre_parse.py +++ b/Lib/sre_parse.py
@@ -485,6 +485,9 @@ elif this == "+": min, max = 1, MAXREPEAT elif this == "{": + if source.next == "}": + subpatternappend((LITERAL, ord(this))) + continue here = source.tell() min, max = 0, MAXREPEAT lo = hi = ""