Easy Tutorial
❮ Jsref Pi Dom Obj Li ❯

JavaScript multiline Property


Definition and Usage

The multiline property is used to return whether the regular expression has the flag m.

If the m flag is set, the property is true, otherwise it is false.

Syntax


Browser Support

All major browsers support the multiline property.


Example

Check if the flag m is set:

var str = "Visit tutorialpro!";
var patt1 = /RUN/gi;

if (patt1.multiline) {
    document.write("m mode is set!");
} else {
    document.write("m mode is not set!");
}

❮ Jsref Pi Dom Obj Li ❯