myRegExp.multiline in ECMAScript 262

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

Property Type
Boolean

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 = theFirstLine.global;     // ** 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 = everyLine.global;     // ** true
val = everyLine.multiline;  // ** true