From cfb0385a02214dc04862651c4981821384a7e193 Mon Sep 17 00:00:00 2001 From: Flaviu Tamas Date: Mon, 12 Jan 2015 21:50:55 -0500 Subject: [PATCH] Add shorthand initialization --- src/nre.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nre.nim b/src/nre.nim index d11a954978..613b3897ff 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 =