summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/extmod/ure1.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/extmod/ure1.py b/tests/extmod/ure1.py
index 577c8f61e..1501a5264 100644
--- a/tests/extmod/ure1.py
+++ b/tests/extmod/ure1.py
@@ -20,13 +20,27 @@ try:
except IndexError:
print("IndexError")
-r = re.compile("[a-c]")
+r = re.compile("[a-cu-z]")
m = r.match("a")
print(m.group(0))
+m = r.match("z")
+print(m.group(0))
m = r.match("d")
print(m)
m = r.match("A")
print(m)
+print("===")
+
+r = re.compile("[^a-cu-z]")
+m = r.match("a")
+print(m)
+m = r.match("z")
+print(m)
+m = r.match("d")
+print(m.group(0))
+m = r.match("A")
+print(m.group(0))
+
r = re.compile("o+")
m = r.search("foobar")