![]() |
VOOZH | about |
The dotAll property in JavaScript regular expressions determines whether the 's' (dotAll) flag is enabled. This flag modifies the behaviour of the dot (.) metacharacter, allowing it to match any character, including line terminators like \n, \r, and others. Without the s flag, the dot (.) matches any character except line breaks.
The dotAll property is a read-only Boolean that reflects whether the s flag is active in a given regular expression.
false false true true
regex.dotAll
true
With the s flag, the dot (.) matches the newline character, allowing the regex to match the entire "Hello\nWorld!" string.
true Start Middle End
The .* pattern, combined with the s flag, matches everything from "Start" to "End", including newlines.
true
<div> Content </div>
true
true true