Eu já vi esse tipo de erro acontecer inúmeras vezes (aliás, enquanto escrevia este email enxerguei outro problema, vou mencioná-lo depois) :<br><br>1. A pessoa quer pegar algo entre aspas, e usa a regexp: /&quot;(.*?)&quot;/
<br><br>2. Daí a pessoa quer dizer que dentro das aspas não pode ter a palavra &quot;all&quot;<br><br>3. Então, a pessoa escreve: <span style="font-family: courier new,monospace;">/&quot;([^(all)]*?)&quot;/</span><br><br>
4. E como isso de fato não bate com &quot;all&quot;, a pessoa fica feliz.<br><br>Eis o erro:&nbsp; <span style="font-family: courier new,monospace;">[aeiou]</span> bate com qualquer caractere dentre <span style="font-weight: bold;">
a</span>, <span style="font-weight: bold;">e</span>,<span style="font-weight: bold;"> i</span>, <span style="font-weight: bold;">o</span>, ou <span style="font-weight: bold;">u</span>.<br><span style="font-family: courier new,monospace;">
[^aeiou]</span> bate com qualquer caractere, exceto <span style="font-weight: bold;">a</span>, <span style="font-weight: bold;">e</span>, <span style="font-weight: bold;">i</span>, <span style="font-weight: bold;">o</span>
, e <span style="font-weight: bold;">u</span>.<br><br><span style="font-family: courier new,monospace;">[^(all)]</span> é igual a <span style="font-family: courier new,monospace;">[^()al]</span> : qualquer caractere, exceto 
<span style="font-weight: bold;">(</span>, <span style="font-weight: bold;">)</span>, <span style="font-weight: bold;">a</span>, ou <span style="font-weight: bold;">l</span><br><br>Para negar a presença de uma seqüência inteira, pode-se usar um &quot;negative lookahead&quot;:
<br><br><span style="font-family: courier new,monospace;">/&quot;<span style="font-weight: bold;">(?!all&quot;)</span>(.*?)&quot;/</span><br><br>Onde <span style="font-family: courier new,monospace;">(?!all)</span> indica que, a partir daquele ponto não pode bater com 
<span style="font-family: courier new,monospace;">all&quot;.<br></span><br>Ah sim, e agora o outro problema que me lembrei acima:<br><br>Gabriel escreveu <span style="font-family: courier new,monospace;">&quot;(.+?)&quot;.
</span><br><br>No exemplo abaixo:<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&lt;option value=&quot;&quot;&gt;&lt;/option&gt;</span><span style="font-family: courier new,monospace;">
&lt;option value=&quot;foo&quot;&gt;&lt;/option&gt;</span><br><br>a regexp vai capturar em $1: <span style="font-family: courier new,monospace;">&quot;&gt;&lt;/option&gt;&lt;option value=</span>. <br><br><span style="font-family: courier new,monospace;">
&lt;option value=&quot;<span style="font-weight: bold; text-decoration: underline;">&quot;&gt;&lt;/option&gt;</span></span><span style="font-family: courier new,monospace;"><span style="font-weight: bold; text-decoration: underline;">
&lt;option value=</span>&quot;foo&quot;&gt;&lt;/option&gt;</span><br><br><div><span class="gmail_quote"><br><br>On 2/1/07, <b class="gmail_sendername">Gabriel Vieira</b> &lt;<a href="mailto:gabriel.vieira@gmail.com">gabriel.vieira@gmail.com
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">$teste = &quot;&lt;option value=\&quot;all\&quot;&gt;oi&lt;/option&gt;&lt;option value=\&quot;\&quot;&gt;ola&lt;/option&gt;&lt;option value=\&quot;:D\&quot;&gt;opa&lt;/option&gt;&quot;;
<br>print &quot;$1\n&quot; while $teste =~ /value=&quot;([^(all)]+?)&quot;/ig;
<br><br>aqui funcionou :P<div><span class="q" id="q_1107ed2eedb90e51_1"><br></span></div></blockquote></div><br clear="all"><br>-- <br>[]s<br>Wendel<br><br>&quot;Não ajustar o auto-ajuste&quot; - <a href="http://wendel.scardua.net/">
http://wendel.scardua.net/</a>