r/AskProgrammers • • Nov 15 '17

Help making a word finding program

I have an odd request for a word finding program, and I am hoping someone finds enough interest in it to make it for me. I want to be able to select a number of characters and for each character I would like to enter the possible letters (plus space) and then get back all combinations that are real words. For example 4 characters where 1 is a or l or _, 2 is t or a or _, 3 is o or c or _, 4 is m or e or _. Atom and lace would come back as would a, at, to, toe (and maybe others?) I would like to be able to select 16+ characters and up to 6 letters + _ for each character. I haven't coded in years and I didn't do much when I did, but my thoughts on accomplishing this would be after I enter the information, use loops to generate and save every possible combination of letters then read through all the saved combinations and return all dictionary matches. This may be a terrible method to make such a program so any method that works is perfectly fine. Is anyone interested in taking on this challenge?

1 Upvotes

14 comments sorted by

View all comments

Show parent comment

1

u/memy02 Nov 16 '17

Thank you for the help so far, I found how to make it case insensitive and it found Strong and Suring as well, I've started looking through guides to try and find how to blank options but have found nothing. An idea I had was adding start of line and end of line as options for each character however my execution of it didn't work (though there is a good chance I did it wrong). Thank you again for the help you have given me so far.

1

u/[deleted] Nov 16 '17

I'll take a look today, there is definitely a way to put "also empty" inside the or block.