August 1999
Intermediate to advanced
1488 pages
72h 53m
English
regexp.ignoreCase
The ignoreCase property of the RegExp object is a flag that informs the user if case is to be ignored during pattern matching or not.
Listing 6.217 shows how ignoreCase is used.
<html> <body> <script language="JavaScript"> <!–– Hide // defines a regular expression on the pattern "and" // with the ignore case flag set. var myPat = new RegExp("and", "i"); // define a string var str = "Would Missy and Livvy like some Candy?"; // store results of exec into myArray myArray = myPat.exec(str); document.write("The value of RegExp.ignoreCase is: " + "<b>" + myPat.ignoreCase + "</b>"); // End Hide ... |
Read now
Unlock full access