English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
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.
regex.multiline
var str = "Hello world"; var regex = /^Hello/m; regex.multiline;// trueTest See‹/›
All browsers fully support the multiline property:
Properties | |||||
multiline | Yes | Yes | Yes | Yes | Yes |
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 |