summary refs log tree commit diff stats
path: root/tests/accept/run/tregex.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/accept/run/tregex.nim')
-rwxr-xr-xtests/accept/run/tregex.nim18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/accept/run/tregex.nim b/tests/accept/run/tregex.nim
index d9d22d603..43dc8f99c 100755
--- a/tests/accept/run/tregex.nim
+++ b/tests/accept/run/tregex.nim
@@ -2,16 +2,16 @@
 # which is based on the PCRE library

 

 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!")
+  re

 

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

+if "keyA = valueA" =~ re"\s*(\w+)\s*\=\s*(\w+)":

+  write(stdout, "key: ", matches[0])

+elif "# comment!" =~ re"\s*(\#.*)":

+  echo("comment: ", matches[0])

+else: 

+  echo("Bug!")

+

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

   echo("Yes!")

 else:

   echo("Bug!")