View Single Post
  #7 (permalink)  
Old 11-01-2009, 07:58 AM
Helge Haensel
Guest
 
Posts: n/a
Default Re: Crossword puzzle

Am 31.10.2009, 11:40 Uhr, schrieb Helge Haensel <dj1wm@nurfuerspam.de>:

>
> Hallo NG!
> Still somebody watching this newsgroup?
>
> I have a wordlist with some 180.000 entries, of course of different
> length and not necessarily sorted. I create a pattern of characters
> like '.EA...R'.
> Now I am looking for a search algorithm that throws up 'WEATHER' but not
> 'THEATER' and so on.
> This is a classical crossword puzzle issue and I assume it is already
> solved.
> Do you know a suitable/fast solution?
> Thanks!
>
> Vy 73! Helge


Hi, surprise!
Well, I was a little bit short with my search/find problem.
My system is: WindowsXP/HE/SP3, OfficeXP/Pro/SP3, VB5EE/SP3
Starting with the pattern as given above I need the possible fitting words
from the word list. 'WEATHER' or 'REALTOR' fits, 'BROTHER', 'WEATHERMAN'
don't fit.
Regular Expressions are a good idea, but I think I can't use them in VB5/6.
The solution of Gordon is a first step but not very flexible for an
extensive use.
Something like 'grep' would be optimal when using a linux/unix system and
being a keyboard hacker. The example code by Gordon isn't very flexible
because the pattern of course changes in length, in chars positions and so
in '.'-positions as a 'grep' would easily allow. But it is possibly the
only starting point to begin with.
Thanks so far.
Helge

Reply With Quote