English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript RegExp ignoreCase Property

 JavaScript RegExp RegExp Object

ignoreCaseThe property indicates whether the regular expression uses the " i ”flag (modifier).

It is true if the 'i' modifier is set; otherwise, it is false

Syntax:

regex.ignoreCase
var str = "HELLO WORLD";
var regex = /Hello/i;
regex.ignoreCase;   // true
Test See‹/›

Browser Compatibility

All browsers fully support the ignoreCase property:

Properties
ignoreCaseYesYesYesYesYes

Technical Details

Writable:No
Enumerable:No
Configurable:Yes
Return Value:It is true if the 'i' modifier is set; otherwise, it is false
JavaScript Version:ECMAScript 1

 JavaScript RegExp RegExp Object