[Rio-pm] bigramas e regexp

Stanislaw Pusep creaktive em gmail.com
Quarta Março 14 08:41:41 PDT 2012


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
>>
>
>
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/rio-pm/attachments/20120314/6e9fbb2e/attachment-0001.html>


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