Merge pull request #18899 from Napalys/js/ecma-2024-regex

JS: Add ECMAScript 2024 `v` Flag Operators for Regex Parsing
This commit is contained in:
Napalys Klicius
2025-03-11 12:50:44 +01:00
committed by GitHub
44 changed files with 8106 additions and 6 deletions

View File

@@ -11,3 +11,4 @@
/[\u{ff}]/;
/[\u{12340}-\u{12345}]/u; // OK
new RegExp("[\u{12340}-\u{12345}]", "u"); // OK
const regex = /\b(?:https?:\/\/|mailto:|www\.)(?:[\S--[\p{P}<>]]|\/|[\S--[\[\]]]+[\S--[\p{P}<>]])+|\b[\S--[@\p{Ps}\p{Pe}<>]]+@([\S--[\p{P}<>]]+(?:\.[\S--[\p{P}<>]]+)+)/gmv;