Friday, January 30, 2026
HomeLanguagesJavascriptJavaScript RegExp dotAll Property

JavaScript RegExp dotAll Property

JavaScript RegExp dotAll property is used to check whether the ‘s’ flag is set or not. If the ‘s’ flag is set then this property returns true else false.

Syntax:

Regexobj.dotAll

Return Value: A boolean value.

Example 1: This example checks if the regular expression contains s Modifier or not. 

Javascript




function dotAll_prop() {
    let regex = new RegExp(/[a-d]/, 's');
     
    console.log(regex.dotAll)
}
 
dotAll_prop();


Output

true

Example 2: This example checks if the regular expression contains s Modifier or not. 

Javascript




function dotAll_prop() {
    let regex = new RegExp(/[a-d]/);
 
    if (regex.ignoreCase) {
        console.log("i Modifier is present");
    } else {
        console.log("i Modifier is absent");
    }
}
 
dotAll_prop();


Output

i Modifier is absent

Supported Browsers:

  • Chrome 62
  • Edge 79
  • Firefox 78
  • Opera 49
  • Safari 11.1

We have a complete list of JavaScript RegExp expressions, to check those please go through this JavaScript RegExp Reference article.

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
RELATED ARTICLES

Most Popular

Dominic
32478 POSTS0 COMMENTS
Milvus
122 POSTS0 COMMENTS
Nango Kala
6849 POSTS0 COMMENTS
Nicole Veronica
11978 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12065 POSTS0 COMMENTS
Shaida Kate Naidoo
6986 POSTS0 COMMENTS
Ted Musemwa
7222 POSTS0 COMMENTS
Thapelo Manthata
6934 POSTS0 COMMENTS
Umr Jansen
6917 POSTS0 COMMENTS