summary refs log tree commit diff stats
path: root/tests/tregex.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tregex.nim')
-rw-r--r--tests/tregex.nim9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/tregex.nim b/tests/tregex.nim
index aa32ca847..d9d22d603 100644
--- a/tests/tregex.nim
+++ b/tests/tregex.nim
@@ -3,10 +3,17 @@
 

 import

   regexprs

+
+if "keyA = valueA" =~ r"\s*(\w+)\s*\=\s*(\w+)":
+  write(stdout, "key: ", matches[1])
+elif "# comment!" =~ r"\s*(\#.*)":
+  echo("comment: ", matches[1])
+else: 
+  echo("Bug!")
 

 if "Username".match("[A-Za-z]+"):

   echo("Yes!")

 else:

   echo("Bug!")

 

-#OUT Yes!

+#OUT key: keyAYes!