[Rio-pm] bigramas e regexp
Nuba Princigalli
nuba em fastmail.fm
Quarta Março 14 09:12:35 PDT 2012
Ou então ler o oldie-but-goldie Mastering Regular Expressions :)
[1]http://regex.info/
On Wed, Mar 14, 2012, at 12:48 PM, Danillo Souza wrote:
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
<[2]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
<[3]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
<[4]gabiruh em gmail.com> wrote:
On Wed, Mar 14, 2012 at 12:21 PM, Gabriel Andrade de Santana
<[5]gabiruh em gmail.com> wrote:
> $_ = q(anticonstitucionalissimamente);
> my (@bigrams) = $_ =~ /(?=(..))/g
>
> TADA!
Opa! foi a mesma resposta do Danillo.
danillo++
gabiruh--
_______________________________________________
Rio-pm mailing list
[6]Rio-pm em pm.org
[7]http://mail.pm.org/mailman/listinfo/rio-pm
_______________________________________________
Rio-pm mailing list
[8]Rio-pm em pm.org
[9]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
References
1. http://regex.info/
2. mailto:creaktive em gmail.com
3. mailto:creaktive em gmail.com
4. mailto:gabiruh em gmail.com
5. mailto:gabiruh em gmail.com
6. mailto:Rio-pm em pm.org
7. http://mail.pm.org/mailman/listinfo/rio-pm
8. mailto:Rio-pm em pm.org
9. http://mail.pm.org/mailman/listinfo/rio-pm
--
Nuba R. Princigalli nuba em pauleira.com http://pauleira.com @nprincigalli
Discipline is not an end in itself, just a means to an end. - King Crimson
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/rio-pm/attachments/20120314/c3e232b9/attachment.html>
Mais detalhes sobre a lista de discussão Rio-pm