Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong match #4

Open
gliviu opened this issue Feb 9, 2016 · 0 comments
Open

wrong match #4

gliviu opened this issue Feb 9, 2016 · 0 comments

Comments

@gliviu
Copy link

gliviu commented Feb 9, 2016

var str = 'aaa\nzzzbbbxxx\nttt'
var testCasesRegexp3 = named(/(:(.|\r|\n)*?)(:bbb)/ig);
var matched = testCasesRegexp3.exec(str);
if(matched){
console.log('g1:'+matched.capture('g1'));
console.log('g2:'+matched.capture('g2'));
}

Prints
g1:aaa\nzzz
g2:z

Maybe I got things wrong but it should
g1:aaa\nzzz
g2:bbb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant