JavaScript ignoreCase property
JavaScript RegExp Object
Definition and Usage
The ignoreCase property indicates whether the "i" flag is set.
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.
Example
Example
Check whether the "i" flag is set:
var
str
=
"
Visit RUNOOB!
"
;
var
patt1
=/
RUN
/
i
;
if
(
patt1
.
ignoreCase
)
{
document
.
write
(
"
The i flag is set!
"
)
;
}
else
{
document
.
write
(
"
The i flag is not set!
"
)
;
}
Try it »
JavaScript RegExp Object