O atributo
ignoreCase
indica se a flag "i" foi ou não utilizada com a expressão regular.ignoreCase
é um atributo somente leitura de uma instância individual de expressãoregular.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Property attributes of RegExp.prototype.ignoreCase |
|
---|---|
Writable | no |
Enumerable | no |
Configurable | yes |
Descrição
O valor de ignoreCase
é um Boolean
etrue
se a flag "i
" foi usada; false
caso contrário. A flag "i" indica que maiúsculas e minúsculas são equivalentes ao se tentar casar uma string com a expressão regular.
Você não pode alterar essa propriedade diretamente.
Exemplos
Usando ignoreCase
var regex = new RegExp('foo', 'i');
console.log(regex.ignoreCase); // true
Especificações
Especificação |
---|
ECMAScript (ECMA-262) The definition of 'RegExp.prototype.ignoreCase' in that specification. |
Compatibilidade com navegadores
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.