JavaScript ignoreCaseProperty
JavaScript RegExp Object
Definition and Usage
The ignoreCase property specifies whether to set "i" the flag.
If the "i" flag is set, it returns true, otherwise it returns false.
Syntax
RegExpObject.ignoreCase
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the ignoreCase property.
Examples
Examples
Check whether the "i" flag is set:
var str="Visit EXAMPLE!";
var patt1=/RUN/i;
if(patt1.ignoreCase)
{
document.write("i mode is set!");
}
else
{
document.write("i mode is not set!");
}
Try it Yourself »
JavaScript RegExp Object Other Extensions