ColinEberhardt / assemblyscript-regex

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

Should not return captured values for non-matching alternations #2

Closed ColinEberhardt closed 3 years ago

ColinEberhardt commented 3 years ago

Current behaviour - (a|b)c|a(b|c) when executed against ab returns values from both capture groups

ColinEberhardt commented 3 years ago

Another example of the same issue:

const regexObj = new RegExp("([abc])*bcd");
const match = regexObj.exec("abcd");
ColinEberhardt commented 3 years ago

closed by https://github.com/ColinEberhardt/assemblyscript-regex/commit/be6f7b581d86ae2f828fed0d2f9328692d55538f