nitely / nim-regex

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

Can't parse nested groups with repetition range #46

Closed nitely closed 4 years ago

nitely commented 4 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.