Visit Mozilla.org

Core JavaScript 1.5 Reference:Global Objects:RegExp:multiline

From MDC


[edit] Summary

Reflects whether or not to search in strings across multiple lines.

Property of RegExp instances

Static

Implemented in: JavaScript 1.2, NES3.0

JavaScript 1.5: multiline is a property of a RegExp instance, not the RegExp object.

ECMA Version: ECMA-262, Edition 3

[edit] Description

multiline is a property of an individual regular expression object..

The value of multiline is true if the "m" flag was used; otherwise, false. The "m" flag indicates that a multiline input string should be treated as multiple lines. For example, if "m" is used, "^" and "$" change from matching at only the start or end of the entire string to the start or end of any line within the string.

You cannot change this property directly.