Web/JavaScript/Reference/Global objects/RegExp/ignoreCase

From Get docs


The ignoreCase property indicates whether or not the "i" flag is used with the regular expression. ignoreCase is a read-only property of an individual regular expression instance.


Property attributes of RegExp.prototype.ignoreCase
Writable no
Enumerable no
Configurable yes


Description

The value of ignoreCase is a Boolean and true if the "i" flag was used; otherwise, false. The "i" flag indicates that case should be ignored while attempting a match in a string.

You cannot change this property directly.

Examples

Using ignoreCase

var regex = new RegExp('foo', 'i');

console.log(regex.ignoreCase); // true

Specifications

Specification
ECMAScript (ECMA-262)The definition of 'RegExp.prototype.ignoreCase' in that specification.

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile Server
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet Node.js
ignoreCase Chrome

Full support 1

Edge

Full support 12

Firefox

Full support 1

IE

Full support 5.5

Opera

Full support 5

Safari

Full support 1

WebView Android

Full support 1

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support 10.1

Safari iOS

Full support 1

Samsung Internet Android

Full support 1.0

nodejs

Full support 0.1.100

Prototype accessor property (ES2015) Chrome

Full support 48

Edge

Full support 12

Firefox

Full support 38

IE

Full support 5.5

Opera

Full support 35

Safari

Full support 1.3

WebView Android

Full support 48

Chrome Android

Full support 48

Firefox Android

Full support 38

Opera Android

Full support 35

Safari iOS

Full support 1

Samsung Internet Android

Full support 5.0

nodejs

Full support 6.0.0

Legend

Full support  
Full support


See also