We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64193c7 commit fc745d8Copy full SHA for fc745d8
tests/extmod/ure_namedclass.py
@@ -15,7 +15,7 @@ def print_groups(match):
15
try:
16
i = 0
17
while True:
18
- print(m.group(i))
+ print(match.group(i))
19
i += 1
20
except IndexError:
21
pass
@@ -32,3 +32,8 @@ def print_groups(match):
32
33
m = re.match(r"(([0-9]*)([a-z]*)\d*)", "1234hello567")
34
print_groups(m)
35
+
36
+# named class within a class set
37
+print_groups(re.match("([^\s]+)\s*([^\s]+)", "1 23"))
38
+print_groups(re.match("([\s\d]+)([\W]+)", "1 2-+="))
39
+print_groups(re.match("([\W]+)([^\W]+)([^\S]+)([^\D]+)", " a_1 23"))
0 commit comments