I am trying to write a crossword solver, but i am new to programming and dont know how to handle entering unknown letters into the search string.
To find a word where some letters are missing, I don't know that you can do better than just looking up all words of the same length in your list of words and make an array of words which match the known letters, unless starting or ending letters are known.
If any starting letters are known, that would narrow your search by a lot, assuming your list is an indexed data file.
If you are using an indexed database, you could also add a field for each word in which the word is spelled backwards; that way, if an ending letter is known, that will likewise make the search go faster.
Example: A five-letter word in which only the 3rd and 5th letters are known: "_ _ r _ y". You could search though all 5-letter words, but if you have the words spelled backwards and indexed, you could just search that field for 5-letter words starting with "y". You would find "yrros", "yarra", etc. Add their forward-spelled fields ("sorry", "array", etc.) to an array of possible matches.