Add shorthand initialization

This commit is contained in:
Flaviu Tamas 2015-01-12 21:50:55 -05:00
commit cfb0385a02

View file

@ -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 =