Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Word Comparison

by nefigah (Monk)
on Mar 26, 2008 at 22:45 UTC ( #676574=note: print w/ replies, xml ) Need Help??


in reply to Word Comparison

Sounds like a fun task, and regular expressions will be your friend here... but from the example you listed, I'm not sure if the rules are totally clear to me? Could you come up with a list of criteria for "what makes a word close enough to another word"? Then we can give some more concrete ideas :)


I'm a peripheral visionary... I can see into the future, but just way off to the side.


Comment on Re: Word Comparison
Re^2: Word Comparison
by rooneyl (Sexton) on Mar 26, 2008 at 22:58 UTC
    I'll try an explain how the game works.
    You are presented with a word, for example 'perlmonksisgreat'.
    You have to try and make words from this using only the letters that are in the word, you can only use each letter as many times as it appears. In the above example you could use 1 x 'p' and 2 x 'e' and so on.
    Some examples of valid words are 'perl', 'slop', 'term'.
    An example of a non-valid word would be 'pepper' (only 1 'p').

      Ah, in that case, use pc88's first example below, it does exactly what you want :)


      I'm a peripheral visionary... I can see into the future, but just way off to the side.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://676574]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2014-12-28 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (178 votes), past polls