-
Notifications
You must be signed in to change notification settings - Fork 8
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
Global flag #5
Comments
Hi, it's just a function that returns a regex, nothing more, so.. But yea, you have right and it may be good to have options as the other packages in that org have.
what you mean with that? |
I just meant it doesn't work without removing the flag, sorry. |
Mainly, my question - in other words - was why is there a "nested" capture for the ID if just the first match is returned. |
Can you try it on chrome? Or what version of FF you use? I'm noticing now few "firefox specific notes" in mozilla docs https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/match |
I've tried with the latest version of Firefox under Windows 10 64 bits, I can tell you more tomorrow; I didn't know Firefox was "special".�
|
Haha, same here. In anyway, i'm not using it from v3, lol.. |
So, I run some tests, here the results. With global flag:
Without global flag:
Do really Chrome and Chromium behave differently? |
Hm, interesting, so probably we should rethink it. PRs welcome, since it works in node. |
I tried, just for curiosity, against this URL
https://www.youtube.com/watch?v=_T2Dxgn-lls
in a normal Firefox browser with normal.match
and it wouldn't work unless removing theg
flag. After removing it the regex returned theid
in the array as needed. Is this the wanted behaviour?The text was updated successfully, but these errors were encountered: