-
Notifications
You must be signed in to change notification settings - Fork 479
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
Tests for regular expression modifiers #3756
Comments
Can you clarify what this means?
Are you describing a RegExp like |
Are there any examples of cases where the result of |
I've found only two instances where
I find it strange that such an asymmetry exists. A quick test of the same pattern in both modes in C# shows no asymmetry, so it's not clear to me if this is expected or is a bug in |
Edited test plan to change "Source text uses unicode escape sequences to express code points |
This seems like it is expected. It comes from WordCharacters. From what I can tell, most other languages' regexps' unicode flag changes the definition of word characters to |
The merged PRs have covered the entire testing plan, so this is done! |
Explainer: https://github.com/tc39/proposal-regexp-modifiers
Spec text: https://tc39.es/proposal-regexp-modifiers/
regexp-modifiers testing plan
i
,m
,s
i
,m
,s
i
,m
,s
i
,m
,s
(I think this is right? https://tc39.es/ecma262/#sec-unicode-format-control-characters)i
,m
, and/ors
more than oncei
,m
,s
e.g.I
,M
,S
i
,m
, ors
(e.g. ſ (U+017F) would map tos
, U+0130 toi
) (ref. https://www.unicode.org/Public/12.1.0/ucd/CaseFolding.txt)/foo(?\u{017F}:bar)/u
is a syntax error,/foo(?s:bar)/u
is not)i
,m
,s
i
i
flag not modifiedm
^
and$
apply appropriately inside subexpression, but not outside; when turned on, off, and when nested inside a subexpression that has previously modified behaviors
.
applies appropriately inside subexpression, but not outside; when turned on, off, and when nested inside a subexpression that has previously modified behavior.flags
or/.../.flags
to have the flags set, e.g.(new RegExp("(?i:a)")).flags
does not includei
.The text was updated successfully, but these errors were encountered: