The new ECMAScript proposal allows enabling a flag on a part of the RegEx pattern. Look at this example where I allow for case insensitivity only on a part of a string.
Proposal
https://github.com/tc39/proposal-regexp-modifiers
Good explainer
https://2ality.com/2025/01/regexp-modifiers.html
#regex
Proposal
https://github.com/tc39/proposal-regexp-modifiers
Good explainer
https://2ality.com/2025/01/regexp-modifiers.html
#regex
Comments