This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer
Traditionally, we could only apply regular expression flags such as i
(for ignoring case) to all of a regular expression. The ECMAScript feature “Regular Expression Pattern Modifiers” (by Ron Buckton) enables us to apply them to only part of a regular expression. In this blog post we examine how they work and what their use cases are.
Regular expression pattern modifiers attributes reached stage 4 in October 2024 and will probably be part of ECMAScript 2025.
This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer

Dr. Axel Rauschmayer | Sciencx (2025-01-10T00:00:00+00:00) ECMAScript feature: regular expression pattern modifiers. Retrieved from https://www.scien.cx/2025/01/10/ecmascript-feature-regular-expression-pattern-modifiers/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.