JavaScript multiline Property
Example
Check whether or not the "m" modifier is set:
var str = "Visit W3Schools!";
var patt1 = /W3S/gi; // "g" and "i" is set, "m" is not.
var res = patt1.multiline;
Try it Yourself »
Definition and Usage
The multiline property specifies whether or not the m modifier is set.
This property returns true if the "m" modifier is set, otherwise it returns false.
Browser Support
Property | |||||
---|---|---|---|---|---|
multiline | Yes | Yes | Yes | Yes | Yes |
Syntax
RegExpObject.multiline
Return Value
Type | Description |
---|---|
Boolean | Returns true if the "m" modifier is set, false otherwise |
Technical Details
JavaScript Version: | ECMAScript 1 |
---|
❮ JavaScript RegExp Object