Ted Schuerzinger wrote, on Saturday, November 06, 2004 3:29 PM
:  I'm an avid, but not very good, Scrabble player.  Last night, I was  
:  playing, and suffered a major brain cramp when I got a rack 
:  of four vowels  
:  *and* two blanks: AEIUR**.  I couldn't come up with anything 
:  at the time,  
:  so this morning wrote a simple Perl script using a regex:
:  
:  if ($_ =~/\b[a-z]{7}\b/i && $_ =~/A/i && $_ =~/E/i && $_ 
:  =~/I/i && $_  
:  =~/R/i && $_ =~/U/i)
:  
:  to find all seven-letter words in the official Tournament 
:  Word List that  
:  have an A, E, I, U, and R.  The script dutifully produced 33 
:  valid words,  
:  embarrassing me by showing that I missed such common words 
:  as ACQUIRE and  
:  FAILURE.  :-)  (On the other hand, I now know the word 
:  RESIDUA, which  
:  should be useful since I know I've had that rack before....)
:  
:  Now for my question: the above regex was fairly easy to come 
:  up with.  But  
:  how would I go about coming up with an efficient regex for 
:  those cases  
:  where the rack contains more than one of the same non-blank? 

I haven't seen anyone recommend this: /T.*T/i to match two 'T's. I'm not
going to compare this to $Bill's word-matching routine :).

Good luck,

Joe

==============================================================
          Joseph P. Discenza, Sr. Programmer/Analyst
               mailto:[EMAIL PROTECTED]
 
          Carleton Inc.   http://www.carletoninc.com
          574.243.6040 ext. 300    fax: 574.243.6060
 
Providing Financial Solutions and Compliance for over 30 Years
***** Please note that our Area Code has changed to 574! *****  



_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to