rence/Global_Objects/Object/constructor)
    2. [ ` Object.prototype.__proto__ ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto) Deprecated 
  13. Methods 
    1. [ ` Object.prototype.__defineGetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__) Deprecated 
    2. [ ` Object.prototype.__defineSetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineSetter__) Deprecated 
    3. [ ` Object.prototype.__lookupGetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__lookupGetter__) Deprecated 
    4. [ ` Object.prototype.__lookupSetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__lookupSetter__) Deprecated 
    5. [ ` Object.prototype.hasOwnProperty() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty)
    6. [ ` Object.prototype.isPrototypeOf() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isPrototypeOf)
    7. [ ` Object.prototype.propertyIsEnumerable() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable)
    8. [ ` Object.prototype.toLocaleString() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toLocaleString)
    9. [ ` Object.prototype.toString() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString)
    10. [ ` Object.prototype.valueOf() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf)

##  In this article

  * Try it 
  * Description 
  * Examples 
  * Specifications 
  * Browser compatibility 
  * See also 

#  RegExp.prototype.ignoreCase

The **` ignoreCase ` ** accessor property of [ ` RegExp ` ](/en-
US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) instances returns
whether or not the ` i ` flag is used with this regular expression.

##  Try it

##  Description

` RegExp.prototype.ignoreCase ` has the value ` 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. Case-insensitive matching is
done by mapping both the expected character set and the matched string to the
same casing.

If the regex is [ Unicode-aware ](/en-
US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode#unicode-
aware_mode) , the case mapping happens through _simple case folding_ specified
in [ ` CaseFolding.txt `
](https://unicode.org/Public/UCD/latest/ucd/CaseFolding.txt) . The mapping
always maps to a single code point, so it does not map, for example, ` Ã `
(U+00DF LATIN SMALL LETTER SHARP S) to ` ss ` (which is _full case folding_ ,
not _simple case folding_ ). It may however map code points outside the Basic
Latin block to code points within it â for example, ` Å¿ ` (U+017F LATIN
SMALL LETTER LONG S) case-folds to ` s ` (U+0073 LATIN SMALL LETTER S) and `
âª ` (U+212A KELVIN SIGN) case-folds to ` k ` (U+006B LATIN SMALL LETTER K).
Therefore, ` Å¿ ` and ` âª ` can be matched by ` /[a-z]/ui ` .

If the regex is Unicode-unaware, case mapping uses the [ Unicode Default Case
Conversion ](https://unicode-
org.github.io/icu/userguide/transforms/casemappings.html) â the same
algorithm used in [ ` String.prototype.toUpperCase() ` ](/en-
US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) . For
example, ` â¦ ` (U+2126 OHM SIGN) and ` Î© ` (U+03A9 GREEK CAPITAL LETTER
OMEGA) are both mapped by Default Case Conversion to themselves but by simple
case folding to ` Ï ` (U+03C9 GREEK SMALL LETTER OMEGA), so ` "Ï" ` is
matched by ` /[\u2126]/ui ` and ` /[\u03a9]/ui ` but not by ` /[\u2126]/i ` or
` /[\u03a9]/i ` . This algorithm prevents code points outside the Basic Latin
block to be mapped to code points within it, so ` Å¿ ` and ` âª ` mentioned
previously are not matched by ` /[a-z]/i ` .

The set accessor of ` ignoreCase ` is ` undefined ` . You cannot change this
property directly.

##  Examples

###  Using ignoreCase

js

    
    
    const regex = /foo/i;