[Rio-pm] bigramas e regexp

Danillo Souza danillo012 em gmail.com
Quarta Março 14 08:48:09 PDT 2012


Vergonhoso que nada cara, regexp sempre foi bizarro e sempre será, é só ter
paciência e muito café xD

perlre++


Abs

Em 14 de março de 2012 12:41, Stanislaw Pusep <creaktive em gmail.com>escreveu:

> A quem interessar como NÃO fazer, segue a evolução do meu (vergonhoso)
> raciocínio :)
>
>  1936  perl -E '$_="qwertyuiop";say $1 while /(.)/g'
>  1937  perl -E '$_="qwertyuiop";say $1 while /(..)/g'
>  1938  perl -E '$_="qwertyuiop";say $1 while /(..?)/g'
>  1939  perl -E '$_="qwertyuiop";say $1 while /(..)/g'
>  1940  perl -E '$_="qwertyuiop";say $1 while /(..|.)/g'
>  1941  perl -E '$_="qwertyuiop";say $1 while /(.|..)/g'
>  1942  perl -E '$_="qwertyuiop";say $1 while /(?=.)/g'
>  1943  perl -E '$_="qwertyuiop";say $1 while /(?=.)../g'
>  1944  perl -E '$_="qwertyuiop";say $1 while /(?=.)(..)/g'
>  1945  perl -E '$_="qwertyuiop";say $1 while /(?=..)(..)/g'
>
> ABS()
>
>
>
>
> On Wed, Mar 14, 2012 at 12:39, Stanislaw Pusep <creaktive em gmail.com>wrote:
>
>> Danillo++
>> Gabriel++
>> Stan--
>>
>> Eu estava insistindo no "m{(?=..)}g" :( #EPIC #FAIL
>>
>> ABS()
>>
>>
>>
>>
>> On Wed, Mar 14, 2012 at 12:23, Gabriel Andrade de Santana <
>> gabiruh em gmail.com> wrote:
>>
>>> On Wed, Mar 14, 2012 at 12:21 PM, Gabriel Andrade de Santana
>>> <gabiruh em gmail.com> wrote:
>>> > $_ = q(anticonstitucionalissimamente);
>>> > my (@bigrams) = $_ =~ /(?=(..))/g
>>> >
>>> > TADA!
>>>
>>>
>>> Opa! foi a mesma resposta do Danillo.
>>>
>>> danillo++
>>> gabiruh--
>>> _______________________________________________
>>> Rio-pm mailing list
>>> Rio-pm em pm.org
>>> http://mail.pm.org/mailman/listinfo/rio-pm
>>>
>>
>>
>
> _______________________________________________
> Rio-pm mailing list
> Rio-pm em pm.org
> http://mail.pm.org/mailman/listinfo/rio-pm
>
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/rio-pm/attachments/20120314/eee3373c/attachment.html>


Mais detalhes sobre a lista de discussão Rio-pm