aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/javascript/reference/global_objects/regexp/ignorecase/index.html
blob: 7891af569d343cb2e282cd71a2a84f7778592165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
title: RegExp.prototype.ignoreCase
slug: Web/JavaScript/Reference/Global_Objects/RegExp/ignoreCase
tags:
  - JavaScript
  - Referencia
  - RegExp
translation_of: Web/JavaScript/Reference/Global_Objects/RegExp/ignoreCase
---
<div>{{JSRef}}</div>

<div>O atributo <strong><code>ignoreCase</code></strong> indica se a flag "i" foi ou não utilizada com a expressão regular.</div>

<div><code>ignoreCase</code> é um atributo somente leitura de uma instância individual de expressão</div>

<div>regular. </div>



<p>{{EmbedInteractiveExample("pages/js/regexp-prototype-ignorecase.html")}}</p>



<div>{{js_property_attributes(0, 0, 1)}}</div>

<h2 id="Descrição">Descrição</h2>

<p>O valor de <code>ignoreCase</code> é um {{jsxref("Boolean")}} e<code>true</code> se a flag "<code>i</code>" foi usada; <code>false</code> 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.</p>

<p>Você não pode alterar essa propriedade diretamente.</p>

<h2 id="Exemplos">Exemplos</h2>

<h3 id="Usando_ignoreCase">Usando <code>ignoreCase</code></h3>

<pre class="brush: js notranslate">var regex = new RegExp('foo', 'i');

console.log(regex.ignoreCase); // true
</pre>

<h2 id="Especificações">Especificações</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Especificação</th>
  </tr>
  <tr>
   <td>{{SpecName('ESDraft', '#sec-get-regexp.prototype.ignorecase', 'RegExp.prototype.ignoreCase')}}</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Compatibilidade com navegadores</h2>

<div>
  <p>{{Compat("javascript.builtins.RegExp.ignoreCase")}}</p>
</div>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{jsxref("RegExp.lastIndex")}}</li>
 <li>{{jsxref("RegExp.prototype.global")}}</li>
 <li>{{jsxref("RegExp.prototype.multiline")}}</li>
 <li>{{jsxref("RegExp.prototype.source")}}</li>
 <li>{{jsxref("RegExp.prototype.sticky")}}</li>
</ul>