Skip to content
Snippets Groups Projects
Commit 98dd126e authored by Damien George's avatar Damien George
Browse files

tests/extmod: Add test for '-' in character class in regex.

parent 8c7db42e
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,12 @@ m = r.match("d") ...@@ -48,7 +48,12 @@ m = r.match("d")
print(m.group(0)) print(m.group(0))
m = r.match("A") m = r.match("A")
print(m.group(0)) print(m.group(0))
print("===")
# '-' character within character class block
print(re.match("[-a]+", "-a]d").group(0))
print(re.match("[a-]+", "-a]d").group(0))
print("===")
r = re.compile("o+") r = re.compile("o+")
m = r.search("foobar") m = r.search("foobar")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment