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

ECMAScript regexp v flag #2074

Closed
noraj opened this issue May 31, 2023 · 12 comments
Closed

ECMAScript regexp v flag #2074

noraj opened this issue May 31, 2023 · 12 comments

Comments

@noraj
Copy link

noraj commented May 31, 2023

Feature

When ECMAScript is selected, the vflag is missing

image

//v is an upgrade of //u see https://v8.dev/features/regexp-v-flag

@atjn
Copy link

atjn commented Jun 11, 2023

This is also called the unicode sets/UnicodeSets flag, for searchability.

There are more technical details here: https://github.com/tc39/proposal-regexp-v-flag

@poebrand
Copy link

Anything that can be done to prioritize support for the v flag would be greatly appreciated. Apparently Google went and rolled out a change in Chrome v114 regarding the pattern attribute on HTML input elements. Chrome now assumes that the RegEx within the pattern attribute is based on the v flag instead of the previous u flag.

@firasdib
Copy link
Owner

I cannot see this flag in the official language specification: https://tc39.es/ecma262/multipage/text-processing.html#sec-get-regexp.prototype.flags

Is this something made up by the Chromium team?

@atjn
Copy link

atjn commented Jun 14, 2023

@firasdib It will be merged into the spec any day: tc39/ecma262#2418

I can understand if you don't want to implement this before it is an official spec, but I will note that all major browsers have implemented the feature and have/will soon ship it in a stable release, so it is unlikely that the spec will be removed or changed in any major way.

@noraj
Copy link
Author

noraj commented Jun 14, 2023

I cannot see this flag in the official language specification: https://tc39.es/ecma262/multipage/text-processing.html#sec-get-regexp.prototype.flags

Is this something made up by the Chromium team?

It's a feature proposal, Chrome is an earlier adopter before it has officially been validated.

@noraj
Copy link
Author

noraj commented Jun 14, 2023

@firasdib It will be merged into the spec any day: tc39/ecma262#2418

I can understand if you don't want to implement this before it is an official spec, but I will note that all major browser have implemented the feature and have/will soon ship it in a stable release, so it is unlikely that the spec will be removed or changed in any major way.

It's already integrated in stable releases of Chromium-based browsers but not on Firefox-based browsers.

@atjn
Copy link

atjn commented Jun 14, 2023

It's already integrated in stable releases of Chromium-based browsers but not on Firefox-based browsers.

It is integrated into Firefox nightly, planned for release in stable Firefox 116. It is also integrated in Safari 17 beta, which will soon be promoted to Safari 17 stable.

At this stage, it is very likely that the feature will ship in Firefox 116 and Safari 17 approximately 1-3 months from now.

@poebrand
Copy link

@firasdib It will be merged into the spec any day: tc39/ecma262#2418
I can understand if you don't want to implement this before it is an official spec, but I will note that all major browser have implemented the feature and have/will soon ship it in a stable release, so it is unlikely that the spec will be removed or changed in any major way.

It's already integrated in stable releases of Chromium-based browsers but not on Firefox-based browsers.

Side note: I added comments in the following places indicating concerns around Chrome having rolled out the v flag before the ECMAScript spec is official (https://github.com/tc39/proposal-regexp-v-flag).

@mathiasbynens
Copy link

@poebrand You might be interested in https://tc39.es/process-document/ which describes the TC39 process for standardizing a new ECMAScript feature. Note that one of the requirements for Stage 4 advancement is having multiple independent shipping implementations. It's unrealistic to expect implementers to wait until a proposal has reached Stage 4 and is merged into the spec, since merging into the spec is blocked on implementers shipping.

@michaelficarra
Copy link

The spec changes for unicode sets (and the v flag) have been merged. See https://tc39.es/ecma262/multipage.

@firasdib
Copy link
Owner

firasdib commented Jun 16, 2023

Thank you for the updates. The character class features seem great, but I have a really hard time digesting \q{...}.

@firasdib
Copy link
Owner

firasdib commented Jul 3, 2023

This feature will be included int he next release, thanks for all the references.

@firasdib firasdib closed this as completed Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants