summaryrefslogtreecommitdiff
path: root/tests/extmod/ure1.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extmod/ure1.py')
-rw-r--r--tests/extmod/ure1.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/extmod/ure1.py b/tests/extmod/ure1.py
index 710720c8b..d1cb9a05d 100644
--- a/tests/extmod/ure1.py
+++ b/tests/extmod/ure1.py
@@ -83,11 +83,16 @@ print(m.group(0))
m = re.search("w.r", "hello world")
print(m.group(0))
-m = re.match('a+?', 'ab'); print(m.group(0))
-m = re.match('a*?', 'ab'); print(m.group(0))
-m = re.match('^ab$', 'ab'); print(m.group(0))
-m = re.match('a|b', 'b'); print(m.group(0))
-m = re.match('a|b|c', 'c'); print(m.group(0))
+m = re.match("a+?", "ab")
+print(m.group(0))
+m = re.match("a*?", "ab")
+print(m.group(0))
+m = re.match("^ab$", "ab")
+print(m.group(0))
+m = re.match("a|b", "b")
+print(m.group(0))
+m = re.match("a|b|c", "c")
+print(m.group(0))
# Case where anchors fail to match
r = re.compile("^b|b$")
@@ -100,4 +105,5 @@ except:
print("Caught invalid regex")
# bytes objects
-m = re.match(rb'a+?', b'ab'); print(m.group(0))
+m = re.match(rb"a+?", b"ab")
+print(m.group(0))