Skip to content

Commit 98dd126

Browse files
committed
tests/extmod: Add test for '-' in character class in regex.
1 parent 8c7db42 commit 98dd126

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/extmod/ure1.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@
4848
print(m.group(0))
4949
m = r.match("A")
5050
print(m.group(0))
51+
print("===")
5152

53+
# '-' character within character class block
54+
print(re.match("[-a]+", "-a]d").group(0))
55+
print(re.match("[a-]+", "-a]d").group(0))
56+
print("===")
5257

5358
r = re.compile("o+")
5459
m = r.search("foobar")

0 commit comments

Comments
 (0)