-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Type of issue
Missing information
Description
The documentation for RegexOptions.ECMAScript
states that it:
Enables ECMAScript-compliant behavior for the expression.
And refers to ECMAScript matching behavior for further information.
RegexOptions.ECMAScript
is claimed to be ECMAScript-compliant by not supporting Unicode and thus character classes such as \p
do not work in that mode. However, ECMAScript actually supports Unicode features just fine if a regex is created with the u
flag, which has been in the ECMAScript specifications since ECMAScript 2015 and has been broadly supported in all major runtimes including desktop browsers, mobile browsers, and Node.js since 2016.
The documentation should at the very least be updated to reflect that RegexOptions.ECMAScript
refers to decade-old legacy versions of ECMAScript.
(Better would be — should ECMAScript compliant behavior and parity still be taken seriously — to also follow up on this with actually implementing a series of RegexOptions.ECMAScript####
flag values corresponding to different specification levels that added relevant features. Esp. relevant for \p
as the actual supported syntax is different and e.g. \p{Script=Latin}
from ECMAScript, is not supported in C# regexes.)
Page URL
Content source URL
Document Version Independent Id
5eff3422-c906-6e35-23f2-24edc9a7310e
Platform Id
bc8182f4-183a-6849-5eb6-439c00944e30