<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18783">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Pessoal, na verdade essas expressões estendidas não 
aceitam quantificadores, certo?</FONT></DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> 
  <A title=fernandolouis@terra.com.br 
  href="mailto:fernandolouis@terra.com.br">Fernando</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=cascavel-pm@pm.org 
  href="mailto:cascavel-pm@pm.org">Cascavel Perl Mongers</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, June 24, 2009 4:04 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Cascavel-pm] REGEXP com 
  [^</DIV>
  <DIV><BR></DIV>
  <DIV><FONT size=2 face=Arial>Pessoal, voltando ao post...</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>Não posso utilizar o "\w+" nessas expressões 
  estendidas?</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>Por exemplo, se eu fizer assim, 
  funciona:</FONT></DIV>
  <DIV><FONT size=2 face=Arial>(?&lt;!palavra)</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>e assim não:</FONT></DIV>
  <DIV><FONT size=2 face=Arial>(?&lt;!\w+)</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>[]s,</FONT></DIV>
  <DIV><FONT size=2 face=Arial>Fernando</FONT></DIV>
  <BLOCKQUOTE 
  style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
    <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
    <DIV 
    style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> 
    <A title=jgasjr@gmail.com href="mailto:jgasjr@gmail.com">Gilmar Santos 
    Jr</A> </DIV>
    <DIV style="FONT: 10pt arial"><B>To:</B> <A title=cascavel-pm@pm.org 
    href="mailto:cascavel-pm@pm.org">Cascavel Perl Mongers</A> </DIV>
    <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, June 18, 2009 4:11 
    PM</DIV>
    <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Cascavel-pm] REGEXP com 
    [^</DIV>
    <DIV><BR></DIV>Eu sempre usei essas opções sem o x... ?&lt;! é um "negative 
    zero-width lookbehind", aí tem o ?&lt; (positive zero-width lookbehind), ?= 
    (positive zero-width lookahead) e ?! (negative zero-width lookahead). O 
    "zero-width" quer dizer que vc não 'consome' (nem captura) os caracteres, 
    como num match padrão.. muito útil :)<BR><BR>[]'s<BR>Gilmar<BR><BR>
    <DIV class=gmail_quote>2009/6/18 Fernando <SPAN dir=ltr>&lt;<A 
    href="mailto:fernandolouis@terra.com.br">fernandolouis@terra.com.br</A>&gt;</SPAN><BR>
    <BLOCKQUOTE 
    style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" 
    class=gmail_quote>
      <DIV bgcolor="#ffffff">
      <DIV><FONT size=2 face=Arial>Perfeito, funcionou! Obrigado!</FONT></DIV>
      <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
      <DIV><FONT size=2 face=Arial>Isso é uma expressão constante estendida, 
      certo?</FONT></DIV>
      <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
      <DIV><FONT size=2 face=Arial>Para usá-lo não tenho que usar o modificador 
      "x"?</FONT></DIV>
      <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
      <DIV><FONT size=2 face=Arial>No livro "Perl - Guia Completo" fala sobre as 
      expressões constantes estendidas, mas em nenhum momento fala dessa opção 
      que você citou Gilmar.</FONT></DIV>
      <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
      <DIV><FONT size=2 face=Arial>Achei que esse gui fosse realmente 
      "completo".</FONT></DIV>
      <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
      <DIV><FONT size=2 face=Arial>[]s,</FONT></DIV>
      <DIV><FONT size=2 face=Arial>Fernando</FONT></DIV><FONT 
      color=#888888></FONT>
      <BLOCKQUOTE 
      style="BORDER-LEFT: rgb(0,0,0) 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
        <DIV>
        <DIV></DIV>
        <DIV class=h5>
        <DIV 
        style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal">----- 
        Original Message ----- </DIV>
        <DIV 
        style="FONT: 10pt arial; BACKGROUND: rgb(228,228,228); font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><B>From:</B> 
        <A title=jgasjr@gmail.com href="mailto:jgasjr@gmail.com" 
        target=_blank>Gilmar Santos Jr</A> </DIV>
        <DIV 
        style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>To:</B> 
        <A title=cascavel-pm@pm.org href="mailto:cascavel-pm@pm.org" 
        target=_blank>Cascavel Perl Mongers</A> </DIV>
        <DIV 
        style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Sent:</B> 
        Thursday, June 18, 2009 3:02 PM</DIV>
        <DIV 
        style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Subject:</B> 
        Re: [Cascavel-pm] REGEXP com [^</DIV>
        <DIV><BR></DIV>Não testado:<BR><BR>/(?&lt;!certificado)\d+/<BR><BR><A 
        href="http://perldoc.perl.org/perlreref.html" 
        target=_blank>http://perldoc.perl.org/perlreref.html</A><BR><BR>[]'s<BR>Gilmar<BR><BR>
        <DIV class=gmail_quote>2009/6/18 Fernando <SPAN dir=ltr>&lt;<A 
        href="mailto:fernandolouis@terra.com.br" 
        target=_blank>fernandolouis@terra.com.br</A>&gt;</SPAN><BR>
        <BLOCKQUOTE 
        style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" 
        class=gmail_quote>Pessoal, não consigo achar a REGEXP que reconhece 
          qual caracterer numérico desde que antes não tenha a palavra-exata 
          "certificado"<BR><BR>tentei:<BR>/[^(certificado)]\d+/<BR><BR>só que 
          isto também reconhece:<BR>identidade 17 (porque tem o caracter "e" e 
          depois um número)<BR><BR>utilizei os pararêntes achando que o Perl 
          iria interpretar o "certificado" como uma palavra inteira.<BR><BR>Mas 
          dessa forma ele verifica se antes do número não tenha qualquer um dos 
          seguintes caracteres: "c", "e", "r", "t", "i", "f", "i", "c", "a", "d" 
          ou "o"<BR><BR>Quero utilizar o "[^" para reconhecer qualquer coisa 
          diferente de uma palavra-exata e não de determinados caracteres 
          um-a-um.<BR><BR>isso:<BR>/[^(certificado)]\d+/<BR><BR>é a mesma coisa 
          que:<BR>/[^odacifitrec]\d+/ # certificado escrito de trás pra 
          frente<BR><BR>o que eu quero é a 
          palavra-exata:<BR>/certificado/<BR><BR>e 
          não:<BR>/c|e|r|t|i|f|i|c|a|d|o/<BR><BR><BR>só que com o "[^" para 
          reconhecer tudo que for diferente dessa palavra-exata.<BR><BR>Im 
          clear? ;)<BR><BR>[]s,<BR><FONT color=#888888>Fernando 
          <BR>_______________________________________________<BR>Cascavel-pm 
          mailing list<BR><A href="mailto:Cascavel-pm@pm.org" 
          target=_blank>Cascavel-pm@pm.org</A><BR><A 
          href="http://mail.pm.org/mailman/listinfo/cascavel-pm" 
          target=_blank>http://mail.pm.org/mailman/listinfo/cascavel-pm</A><BR></FONT></BLOCKQUOTE></DIV><BR></DIV></DIV>
        <P></P>
        <HR>

        <DIV class=im>
        <P></P>_______________________________________________<BR>Cascavel-pm 
        mailing list<BR><A href="mailto:Cascavel-pm@pm.org" 
        target=_blank>Cascavel-pm@pm.org</A><BR><A 
        href="http://mail.pm.org/mailman/listinfo/cascavel-pm" 
        target=_blank>http://mail.pm.org/mailman/listinfo/cascavel-pm</A></DIV></BLOCKQUOTE></DIV><BR>_______________________________________________<BR>Cascavel-pm 
      mailing list<BR><A 
      href="mailto:Cascavel-pm@pm.org">Cascavel-pm@pm.org</A><BR><A 
      href="http://mail.pm.org/mailman/listinfo/cascavel-pm" 
      target=_blank>http://mail.pm.org/mailman/listinfo/cascavel-pm</A><BR></BLOCKQUOTE></DIV><BR>
    <P>
    <HR>

    <P></P>_______________________________________________<BR>Cascavel-pm 
    mailing 
    list<BR>Cascavel-pm@pm.org<BR>http://mail.pm.org/mailman/listinfo/cascavel-pm</BLOCKQUOTE>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Cascavel-pm mailing 
  list<BR>Cascavel-pm@pm.org<BR>http://mail.pm.org/mailman/listinfo/cascavel-pm</BLOCKQUOTE></BODY></HTML>