Babel plugin that transpiles modern RegExp features (dotAll s-flag, named capturing groups, extended x-flag) down to ES5-compatible JavaScript. Current stable version is 0.0.6, last updated in 2019. This plugin has low maintenance cadence and is based on the regexp-tree library. It is a non-standard package, not affiliated with Babel core, and mostly useful for projects that need to support older JavaScript engines without native support for these features.
npm install babel-plugin-transform-modern-regexpNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows Babel configuration enabling dotAll and named groups features, and a sample transformation.
Use native RegExp features or a more actively maintained plugin like @babel/plugin-proposal-unicode-property-regex.
Manually install regexp-tree: npm install regexp-tree --save-dev.
Use new RegExp(pattern, 'x') syntax for extended flag.
Use ["transform-modern-regexp", { ... }] structure.Install the plugin: npm install babel-plugin-transform-modern-regexp --save-dev
Use correct format in .babelrc: ["transform-modern-regexp", { "features": [...] }]Run: npm install regexp-tree --save-dev