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

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
Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2015-11-29 01:44 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls