RegExp.prototype.dotAll

Draft
This page is not complete.

The dotAll property indicates whether or not the "s" flag is used with the regular expression. dotAll is a read-only property of an individual regular expression instance.

Property attributes of RegExp.prototype.dotAll
Writable no
Enumerable no
Configurable yes

Description

The value of dotAll is a Boolean and true if the "s" flag was used; otherwise, false. The "s" flag indicates that the dot special character (".") should additionally match the following line terminator ("newline") characters in a string, which it would not match otherwise:

  • U+000A LINE FEED (LF) ("\n")
  • U+000D CARRIAGE RETURN (CR) ("\r")
  • U+2028 LINE SEPARATOR
  • U+2029 PARAGRAPH SEPARATOR

This effectively means the dot will match any character on the Unicode Basic Multilingual Plane (BMP). To allow it to match astral characters, the "u" (unicode) flag should be used. Using both flags in conjunction allows the dot to match any Unicode character, without exceptions.

You cannot change this property directly.

Browser compatibility

No compatibility data found. Please contribute data for "javascript.builtins.RegExp.dotAll" (depth: 1) to the MDN compatibility data repository.

See also

Document Tags and Contributors

Contributors to this page: mdnwebdocs-bot, NoInkling, ExE-Boss
Last updated by: mdnwebdocs-bot,