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" is 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 supports

multiline Ito ay ECMAScript1 (ES1) na katangian.

Lahat ng mga browser ay ganap na sumusuporta sa ES1 (JavaScript 1997):

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