From http://www.w3schools.com (Copyright Refsnes Data)

JavaScript multiline Property


RegExp Object Reference JavaScript RegExp Object

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.

Syntax

RegExpObject.multiline


Example

Example

Check whether or not the "m" modifier is set:

<script type="text/javascript">

var str="Visit W3Schools!";
var patt1=/W3S/gi;

if(patt1.multiline)
  {
  document.write("m modifier is set!");
  }
else
  {
  document.write("m modifier is not set!");
  }

</script>

The output of the code above will be:

m modifier is not set!

Try it yourself »


RegExp Object Reference JavaScript RegExp Object

From http://www.w3schools.com (Copyright Refsnes Data)