Return to Snippet

Revision: 7012
at July 1, 2008 19:28 by zingo

Initial Code
# words with three consecutive doubled letters
perl -ne 'print if /(.)\1(.)\2(.)\3/' /usr/share/dict/words

# words with three doubled letters, regardless of whether they’re consecutive.
perl -ne 'print if /(.)\1.(.)\2.(.)\3/' /usr/share/dict/words

# words with four doubled letters
perl -ne 'print if /(.)\1.*(.)\2.*(.)\3.*(.)\4/' /usr/share/dict/words

Initial URL

Initial Description

Initial Title
Words with many doubled letters

Initial Tags
regex, perl

Initial Language