Skip to content

regexp/match-any

💼 This rule is enabled in the following configs: 🟢 flat/recommended, 🔵 recommended.

🔧 This rule is automatically fixable by the --fix CLI option.

enforce match any character style

📖 Rule Details

This rule enforces the regular expression notation to match any character.
e.g. [\s\S], [^], /./s (dotAll) and more.

Now loading...

🔧 Options

json
{
  "regexp/match-any": ["error", {
    "allows": ["[\\s\\S]", "dotAll"]
  }]
}
  • "allows" ... An array of notations that any characters that are allowed.
    "[\\s\\S]", "[\\S\\s]", "[^]" and "dotAll" can be set.

{ "allows": ["[^]"] }

Now loading...

🚀 Version

This rule was introduced in eslint-plugin-regexp v0.1.0

🔍 Implementation