word()

The word method will match the word you put in as parameter. Meaning it must be surrounded by whitespaces.

word will escape characters for you automatically.

Usage

word(PARAMETERS)

Example

const word = "Is this rule3 or rule4?";
const code = "<matchAll> word(rule[number])"
// Match: "rule3", "rule4"

Regex

word will just plainly translate into regex. A will be a, however, some characters will be escaped, like . which will become \..