JavaScript multiline property
Definition and Usage
multiline property is used to return to the regular expression whether flag m.
If the m flag is set, this property is true, otherwise false.
grammar
RegExpObject.multiline
Browser Support
All major browsers support multiline property.
Examples
Examples
Find whether the flag m:
<script>
var str="Visit W3Cschool!";
var patt1=/W3C/gi;
if(patt1.multiline)
{
document.write("m modifier is set!");
}
else
{
document.write("m modifier is not set!");
}
</script>
var str="Visit W3Cschool!";
var patt1=/W3C/gi;
if(patt1.multiline)
{
document.write("m modifier is set!");
}
else
{
document.write("m modifier is not set!");
}
</script>
Examples of the above output:
m modifier is not set!
try it"
JavaScript RegExp Object