
mhx
Enthusiast
/ Moderator
Feb 22, 2002, 1:58 PM
Post #2 of 2
(46069 views)
|
Re: [Jasmine] Dictionary - 10 non-repeating letters from /usr/dict/words
[In reply to]
|
Can't Post
|
|
Please ignore the redundant spaces in my code around the &&, I had to put them there because the forum seems to have some problems with it... Here's my try:
perl -ne'/^((.)(?!.*\2)){10}$/ && print' The above will give the same output as the given examples, but it is unfortunately only correct from an ASCII point of view. As a bunch of words in the file start with capitals, you will find the following words in the output that have a repetition of the capital letter in them:
Andromache Babylonize Candlewick Copernicus Ektachrome Gatlinburg McLaughlin McNaughton Normanizes Polyphemus Richardson Romanizers Stravinsky The following is slightly longer, but fixes the misbehaviour:
perl -ne'/^((.)(?!.*\2)){10}$/i && print' -- mhx
At last with an effort he spoke, and wondered to hear his own words, as if some other will was using his small voice. "I will take the Ring," he said, "though I do not know the way."-- Frodo
|