Skip to main content

@babel/plugin-transform-dotall-regex

NOTE: This plugin is included in @babel/preset-env, in ES2018

Example

In

JavaScript
/./s;

Out

JavaScript
/[\0-\uFFFF]/;

In

JavaScript
/./su;

Out

JavaScript
/[\0-\u{10FFFF}]/u;

Here’s an online demo.

Installation

npm install --save-dev @babel/plugin-transform-dotall-regex

Usage

.babelrc

babel.config.json
{
"plugins": ["@babel/plugin-transform-dotall-regex"]
}

Via CLI

Shell
$ babel --plugins @babel/plugin-transform-dotall-regex script.js

Via Node.js API

JavaScript
require("@babel/core").transformSync(code, {
plugins: ["@babel/plugin-transform-dotall-regex"],
});

Author

twitter/mathias
Mathias Bynens