valoricDe / MultiRegExp2

Get all matches of a regexp with corresponding start and end positions
GNU General Public License v3.0
12 stars 5 forks source link

another parsing problem #4

Closed qjebbs closed 7 years ago

qjebbs commented 7 years ago

code:

let r = new MultiRegExp2(/a(?:(b))?/);
console.log(r.regExp.source);

result:

(a(?:)(b))?

expected:

(a)(?:(b))?
valoricDe commented 7 years ago

Good case. Maybe I should add unit tests to the module. Are you familiar with unit testing?

valoricDe commented 7 years ago

Ok fixed in master.