How to use ignoreCase Property in JavaScript

This article describe about ignoreCase Property in JavaScript.
  • 1572

ignoreCase Property in JavaScript

"i" modifier is set or not define by the ignore case property.
 
Return true if the "i" modifier is set, otherwise false.

Syntax

RegExpObject.ignoreCase

 

Example

 

<!DOCTYPE html>

<html>

<body>

<script type="text/javascript">

    var str = "This is a good boy";

    var pattern = /boy/m;

 

    if (pattern.ignoreCase) {

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

    }

    else {

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

    }

</script>

</body>

</html>

 

Output

 

pic4.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.