nitely / nim-regex

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

Capture the last group repetition by default #100

Closed nitely closed 11 months 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 11 months ago

done in #111