From cfb0385a02214dc04862651c4981821384a7e193 Mon Sep 17 00:00:00 2001 From: Flaviu Tamas Date: Mon, 12 Jan 2015 21:50:55 -0500 Subject: Add shorthand initialization --- src/nre.nim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/nre.nim') 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 = -- cgit 1.4.1-2-gfad0