diff options
-rw-r--r-- | lib/impure/re.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/impure/re.nim b/lib/impure/re.nim index 57dc3a313..ef02a3b1d 100644 --- a/lib/impure/re.nim +++ b/lib/impure/re.nim @@ -239,8 +239,9 @@ template `=~` *(s: string, pattern: TRegEx): expr = ## else: ## echo("syntax error") ## + bind maxSubPatterns when not definedInScope(matches): - var matches {.inject.}: array[0..re.maxSubPatterns-1, string] + var matches {.inject.}: array[0..maxSubPatterns-1, string] match(s, pattern, matches) # ------------------------- more string handling ------------------------------ |