How to use multiline Property in JavaScript

This article describe about multiline Property in JavaScript.
  • 1474

multiline Property in JavaScript

It is define m modifier is set or not, and multiline return true if the "m" modifier is set, otherwise return false.

Syntax

RegExpObject.multiline

 

Example

 

<!DOCTYPE html>

<html>

<body>

 

<script type="text/javascript">

    var str = "dotnetheaven.com visit!";

    var pattern = /dot/m;

 

    if (pattern.multiline) {

        document.write("m modifier is set!");

    }

    else {

        document.write("m modifier is not set!");

    }

</script>

</body>

</html>

 

Output

 

pic2.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2013 dotNetheaven. All rights reserved.