Adjust re for nre's inclusive bounds

This commit is contained in:
Flaviu Tamas
2015-05-26 19:48:58 -04:00
parent dc60a51e15
commit 15ef227c48

View File

@@ -97,7 +97,7 @@ template returnBounds(): stmt {.immediate, dirty.} =
return (m.matchBounds.a, <m.matchBounds.b)
template returnLength(): stmt {.immediate, dirty.} =
return m.matchBounds.b - m.matchBounds.a
return m.matchBounds.b - m.matchBounds.a + 1
proc findBounds*(s: string, pattern: Regex, matches: var openArray[string],
start = 0): tuple[first, last: int] =