summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nre.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nre.nim b/src/nre.nim
index d11a95497..613b3897f 100644
--- a/src/nre.nim
+++ b/src/nre.nim
@@ -282,6 +282,8 @@ proc initRegex*(pattern: string, options = "Sx"): Regex =
       raise StudyError(msg: $errorMsg)
 
   result.captureNameToId = result.getNameToNumberTable()
+
+proc re*(pattern: string, options = "Sx"): Regex = initRegex(pattern, options)
 # }}}
 
 proc matchImpl(str: string, pattern: Regex, start, endpos: int, flags: int): RegexMatch =