| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/RegExp/ignoreCase | [Back] [Original] |
Get to know MDN better
Esta pgina foi traduzida do ingls pela comunidade. Saiba mais e junte-se comunidade MDN Web Docs.
This feature is well established and works across many devices and browser versions. Its been available across browsers since julho de 2015.
O atributo ignoreCase indica se a flag "i" foi ou no utilizada com a expresso regular.ignoreCase um atributo somente leitura de uma instncia individual de expressoregular.
const regex1 = new RegExp("foo");
const regex2 = new RegExp("foo", "i");
console.log(regex1.test("Football"));
// Expected output: false
console.log(regex2.ignoreCase);
// Expected output: true
console.log(regex2.test("Football"));
// Expected output: true
Property attributes of RegExp.prototype.ignoreCase | |
|---|---|
| Writable | no |
| Enumerable | no |
| Configurable | yes |
O valor de ignoreCase um Boolean etrue se a flag "i" foi usada; false caso contrrio. A flag "i" indica que maisculas e minsculas so equivalentes ao se tentar casar uma string com a expresso regular.
Voc no pode alterar essa propriedade diretamente.
ignoreCasevar regex = new RegExp("foo", "i");
console.log(regex.ignoreCase); // true
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-get-regexp.prototype.ignorecase |
RegExp.lastIndexRegExp.prototype.globalRegExp.prototype.multilineRegExp.prototype.sourceRegExp.prototype.stickyThis page was last modified on 17 de fev. de 2025 by MDN contributors.
RegExpObject/FunctionObject.prototype.__defineGetter__()Object.prototype.__defineSetter__()Object.prototype.__lookupGetter__()Object.prototype.__lookupSetter__()Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |