Words with many doubled letters


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # words with three consecutive doubled letters
  2. perl -ne 'print if /(.)\1(.)\2(.)\3/' /usr/share/dict/words
  3.  
  4. # words with three doubled letters, regardless of whether they’re consecutive.
  5. perl -ne 'print if /(.)\1.(.)\2.(.)\3/' /usr/share/dict/words
  6.  
  7. # words with four doubled letters
  8. perl -ne 'print if /(.)\1.*(.)\2.*(.)\3.*(.)\4/' /usr/share/dict/words

URL: http://www.leancrew.com/all-this/2008/07/words-with-many-doubled-letters/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.