JavaScript RegExp multiline property

Definition and usage

multiline Property specifies whether the m modifier is set.

If the 'm' modifier is set, this property returns true, otherwise returns false.

Example

let text = "Visit CodeW3C.com!";
let pattern = /W3S/gi; // 'g' and 'i' are set, 'm' is not.
let result = pattern.multiline;

Try it yourself

Syntax

regexp.multiline

Return value

Type Description
Boolean value If the 'm' modifier is set, it returns true, otherwise it returns false.

Browser support

multiline Is ECMAScript1 (ES1) Feature.

All browsers fully support ES1 (JavaScript 1997):

Chrome IE Edge Firefox Safari Opera
Support Support Support Support Support Support