Open xinshangshangxin opened 6 years ago
Hi @xinshangshangxin thank you for your feedback. I always have to dive in again into the logic. I will have a look at it tonight. If you have any suggestions aka pull request I'll happily have a look at it.
Pasting code on jsfiddle gives error
@mafar
1st. Create a separate ticket
2nd Do you mind posting the url to the jsfiddle.
3rd use npm install multi-regexp2 or the files from dist
when not using ES6 compatible environment
Hey @xinshangshangxin I never got back to you. (ba)+
is really tricky. it just catches the last occurence of ba
. So if I add the capturing group it would have three matching groups altough you only specified two. But on the other hand all developers probably want to know the hole group when they right something like this.
like next line RegExp, which with repeat symbol (
+
or*
), it will be wrong/(ba)+.(a*)/
I think the regexp should change to
/((ba)+).(a*)/
when calculate the next match position