RegExp.multiline

JavaScript 1.2+, Jscript 3.0+ Nav4+, NES3+, IE4+ Syntax

							regexp.multiline

Description

The multiline property of the RegExp object is used to determine whether pattern matching should be performed across multiple lines.

Example

Listing 6.223 shows how multiline is used.

Listing 6.223 Example of multiline
 <html> <body> <script language="JavaScript"> <!–– Hide // function creates a new regular expression and // then executes it against the text in the textarea. // Outputs an alert message indicating the boolean value // of the RegExp.multiline property. function getinfo(){ var myPat = new RegExp("the", "i"); var str = document.form1.mytext.value; myArray = myPat.exec(str); alert("RegExp.$* is: " + RegExp.multiline); } ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.