Re: pcre extended character class support
| From: | Ayesh Karunaratne | Date: | Tue, 29 Jul 2025 02:25:06 +0000 |
| Subject: | Re: pcre extended character class support | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128283@lists.php.net to get a copy of this message | ||
>
> The reason this is opt-in in pcre2lib, is because the interpretation of existing regexes may
> change.
> This standard is being adopted in other languages too, also opt-in, for example in JavaScript
> [1].
> To expose this functionality in PHP, we also have to make it opt-in via a modifier.
>
Hi Niels,
I'm also very much in favor of adding it too. Thank you.
In JavaScript, all current browsers seem to support[^1] it, and at
least for Firefox, it even defaults[^2] to the
/v flag for the HTML
input pattern attribute.
[^1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicodeSets
[^2]: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/pattern