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

Capture the last group repetition by default #100

Closed nitely closed 1 year ago

nitely commented 3 years ago

Capturing all group repetitions (even if there are no repetitions) makes the matching take unbounded space. I think it'd be better to capture only the last group repetition, as that's what most regex engines do. We could support both features, and make capturing the last repetition the default, or maybe the only option.

Related: https://github.com/nitely/nregex/pull/4

nitely commented 1 year ago

done in #111