Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

and to squash a little further:

    perl -ne '/^(?=([abc].*){3})(?!.*([abc]).*\2).{8}k.$/&&print' /usr/share/dict/words


Bug: 11 words are missing.

  [me@fedora ~]$ time perl -ne '/^(?=([abc].*){3})(?!.*([abc]).*\2).{8}k.$/&&print' /usr/share/dict/words | wc -l
  6

  real 0m0,118s
  user 0m0,112s
  sys 0m0,007s




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: