http://www.perlmonks.org?node_id=1005420


in reply to Regex to compare (if) two strings (Uniquely - I will explain inside)

The solutions of BrowserUk, Kenosis and CountZero seem to be going after anagrams, but my understanding from the reference  allusion to Scrabble in the OP is that words with fewer letters than the 'random' set are acceptable, e.g., 'no' and 'won' as well as 'wonk' from the random set 'know'. Am I off-base on this?

  • Comment on Re: Regex to compare (if) two strings (Uniquely - I will explain inside)

Replies are listed 'Best First'.
Re^2: Regex to compare (if) two strings (Uniquely - I will explain inside)
by frozenwithjoy (Priest) on Nov 24, 2012 at 20:18 UTC
    I agree that OP is leaning more towards Scrabble with the caveat that Scrabble requires the use of at least one (non-random) letter already on the board.

      Hey, I just noticed this! It gives the whole assignment (if you can decode it). Now I'm a little bit sorry I contributed.

        Hmmmmrphh. I wonder: different student, same class or someone changing names?
Re^2: Regex to compare (if) two strings (Uniquely - I will explain inside)
by CountZero (Bishop) on Nov 25, 2012 at 12:23 UTC
    Check my solution once more: it will return "OK" for a "Scrabble" word.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics