Word Letter Pattern Search

This is a JavaScript/PHP implementation of the letter pattern word search program. This takes a series of C and V characters then finds words with matching consonants and vowels with the given pattern.

I originally built a C++ version of this to find words with given patterns for a puzzle I was making. The puzzle might get used someday so I won’t post it just yet. This PHP version is a bit slower than the C++ version but it is surprisingly fast even when searching for a common pattern like “CVCC”.

The functional page content is within an iframe to allow it to make an AJAX request of a server different from this blog server. The server code is written in PHP and returns a list of words as HTML data with line breaks between each word. There is a directory on the server with an assortment of text files holding the words. These were obtained from various free sources on the internet. The PHP script filters out duplicates, of which there are many.

Vowels are A-E-I-O-U in this program since puzzles need to have only one non-ambiguous solution.

The option to throw out words with Y was added more recently and a bug was fixed that caused some words to get thrown out because of, well, a bug in the code.