ColinEberhardt / assemblyscript-regex

A regex engine for AssemblyScript
MIT License
86 stars 12 forks source link

capture groups with quantifiers should not be repeated in the returned results #31

Closed ColinEberhardt closed 3 years ago

ColinEberhardt commented 3 years ago

ac matched against ([a-c]){2} should return a single capture group with the value c:

https://regex101.com/r/K97m2f/1/

In the current implementation the capture group is duplicated, returning both a and c.

ColinEberhardt commented 3 years ago

fixed by: https://github.com/ColinEberhardt/assemblyscript-regex/commit/84027b880b074ade59d1b39f97bc7c0c4ca6a569