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

| (or) in combination with capturing parentheses doesn't work #12

Open
jens-duttke opened this issue Nov 8, 2019 · 0 comments
Open

Comments

@jens-duttke
Copy link

I have a problem with the | operator and capturing groups in my regexp:

const MultiRegExp2 = require('multi-regexp2').default;

const matches = new MultiRegExp2(new RegExp('(a)|(b)')).execForAllGroups('b', true);

console.log(matches);
// -> null

Normally the matches should looks like this:
https://regex101.com/r/jn9DU9/1

Full match 0-1 b
Group 2. 0-1 b
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