JavaScript RegExp - ignoreCase



Description

ignoreCase is a read-only boolean property of RegExp objects. It specifies whether a particular regular expression performs case-insensitive matching, i.e., whether it was created with the "i" attribute.

Syntax

Its syntax is as follows −

RegExpObject.ignoreCase

Return Value

Returns "TRUE" if the "i" modifier is set, "FALSE" otherwise.

Example

   
   
      JavaScript RegExp ignoreCase Property
   
   
   
            
   

Output

Test1 - ignoreCase property is not set
Test2 - ignoreCase property is set 
Advertisements