# regexp/match-any
enforce match any character style
- ⚙️ This rule is included in
"plugin:regexp/recommended"
. - 🔧 The
--fix
option on the command line (opens new window) can automatically fix some of the problems reported by this rule.
# 📖 Rule Details
This rule enforces the regular expression notation to match any character.
e.g. [\s\S]
, [^]
, /./s
(dotAll) and more.
# 🔧 Options
{
"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": ["[^]"] }
# 🚀 Version
This rule was introduced in eslint-plugin-regexp v0.1.0