nitely / nim-regex

Pure Nim regex engine. Guarantees linear time matching
https://nitely.github.io/nim-regex/
MIT License
228 stars 21 forks source link

Can't parse nested groups with repetition range #46

Closed nitely closed 5 years ago

nitely commented 5 years ago

The following code throws an error:

import regex
let text = "abab"
var m: RegexMatch
doAssert text.match(re"(a(b)){2}", m)

However, re"(ab){2}" works as expected: it captures @["ab", "ab"] for abab text.