[SP-pm] Regular Expression
Gabriel Vieira
gabriel.vieira em gmail.com
Quarta Janeiro 24 10:09:24 PST 2007
-------------8<-------------
my $texto = "Olá,
meu nome é José.";
if($texto =~ /^.((.|\n)+?)\./){
$texto =~ s/$1//;
}
print $texto;
------------->8-------------
Mais instrutivo? :P Será?
On 1/24/07, Gabriel Vieira <gabriel.vieira em gmail.com> wrote:
>
> Gambiarra V.1.0 :P
>
> ---------------------8<---------------------
> my $texto = "Olá,\nmeu nome é José.";
> $texto =~ s/$1// if $texto =~ /^.((.|\n)+?)\./; # Considera qualquer
> caractere incluindo newline e só vale até o 1o ponto final que aparecer :)
> print $texto; # O.
> --------------------->8---------------------
>
> Abraços ;)
>
> On 1/24/07, Lucas Zechim < lzechim em gmail.com> wrote:
> >
> > Bem que tentei, mais não consegui...
> >
> > Qual a expressão regular para remover todos os caracteres entre o
> > primeiro caractere e o ponto (.)?
> >
> > input: lucas.zechim
> > output: lzechim
> >
> > tks..
> > --
> > Lucas Zechim
> > lzechim em gmail.com
> > _______________________________________________
> > SaoPaulo-pm mailing list
> > SaoPaulo-pm em pm.org
> > http://mail.pm.org/mailman/listinfo/saopaulo-pm
> >
>
>
>
> --
> Gabriel Vieira
--
Gabriel Vieira
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://mail.pm.org/pipermail/saopaulo-pm/attachments/20070124/05f6bedc/attachment-0001.html
Mais detalhes sobre a lista de discussão SaoPaulo-pm