-
Notifications
You must be signed in to change notification settings - Fork 22.7k
Sticky flag doesn't entirely mask the global flag #1454
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
Comments
@rauschma It would be great, if you could lend us your expertise on this! |
For See this table: https://gist.github.com/rauschma/8bd701d07f936c0c335681deaab612b5 |
I'm deferring to @yari-content-javascript (= @Rumyra @Elchi3 and @sideshowbarker) for an answer |
Seems to me that @rauschma 's info is worth mentioning on the specific method pages (if not present, I didn't check), as well as a relevant note on the pages for flags. This can also be added to 'See also' sections https://2ality.com/2020/01/regexp-lastindex.html |
Thanks @Rumyra! This is a newer version of this content: https://exploringjs.com/impatient-js/ch_regexps.html#regexp-flags-gy |
@fireattack commented on Fri Nov 13 2020
Request type
Details
It says
But this doesn't seem to match my observation.
The above all have different behaviors:
(And they're as expected.)
@fireattack commented on Fri Nov 13 2020
Same error can be seen at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/global
Edit: a very detailed article about difference between
y
,g
,yg
: https://2ality.com/2020/01/regexp-lastindex.htmlThe text was updated successfully, but these errors were encountered: