diff options
author | Flaviu Tamas <tamasflaviu@gmail.com> | 2015-01-12 21:50:55 -0500 |
---|---|---|
committer | Flaviu Tamas <tamasflaviu@gmail.com> | 2015-01-12 21:50:55 -0500 |
commit | cfb0385a02214dc04862651c4981821384a7e193 (patch) | |
tree | 7081c01c70f3cf962a2fb16c493c9ca3ce7bd944 /src/nre.nim | |
parent | aac71d0fc9b3e381ed9a6a30ac5fac38b9665116 (diff) | |
download | Nim-cfb0385a02214dc04862651c4981821384a7e193.tar.gz |
Add shorthand initialization
Diffstat (limited to 'src/nre.nim')
-rw-r--r-- | src/nre.nim | 2 |
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 = |