myRegExp.multiline in ECMAScript 262

The multiline flag for the regular expression.
This property is read-only.

Property Type

Corresponds to the "m" flag when creating a regular expression, and indicates whether or not ^ and $ in the regular expression refer to the beginning and end of the string (multiline is false) or if they refer to the beginning and end of lines (multiline is true).

var val;
var theFirstLine = /^.+/g; //matches from the start of the string to the first newline
val = theFirstLine.ignoreCase; // ** false
val =;     // ** true
val = theFirstLine.multiline;  // ** false

var everyLine = /^.+/gm; //matches from the start of a new line to end of that line
val = everyLine.ignoreCase; // ** false
val =;     // ** true
val = everyLine.multiline;  // ** true