English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript RegExp multiline Property

 JavaScript RegExp RegExp Object

The multiline property indicates whether to treat the ' m flag (modifier)' is used with the regular expression.

If the ' m If the 'flag (modifier)' is specified, this property returns true; otherwise, it returns false.

Syntax:

regex.multiline
var str = "Hello world";
var regex = /^Hello/m;
regex.multiline;// true
Test See‹/›

Browser Compatibility

All browsers fully support the multiline property:

Properties
multilineYesYesYesYesYes

Technical Details

Writable:No
Enumerable:No
Configurable:Yes
Return Value:If the 'm' modifier is set, it returns true; otherwise, it returns false.
JavaScript Version:ECMAScript 1

 JavaScript RegExp RegExp Object