August 1999
Intermediate to advanced
1488 pages
72h 53m
English
regexp.multiline
The multiline property of the RegExp object is used to determine whether pattern matching should be performed across multiple lines.
Listing 6.223 shows how multiline is used.
<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); } ... |
Read now
Unlock full access