I wrote a little tool today that others may find useful. This tool allows you to load a list of words (could be a big list, like a dictionary), and then search it using a regular expression. I needed it to help me create some puzzles (letterfind, swedish and crossword styles). The program was written […]
This article was posted by Independent Software, a website and database application development company based in Maputo, Mozambique. Our website offers regular write-ups on technical and design issues, ranging from details at code level to 3D Studio Max rendering. Read more about Independent Software's philosophy, or get in touch with Independent Software.
I wrote a little tool today that others may find useful. This tool allows you to load a list of words (could be a big list, like a dictionary), and then search it using a regular expression. I needed it to help me create some puzzles (letterfind, swedish and crossword styles).
The program was written in C# and requires .NET 2.0 on your machine. It comes with two sample word lists: one with almost a million words from the Portuguese language, and one with 50 names of trees in Portuguese (of course the program can handle words in different languages!).
Be sure that your wordlists are plaintext with one word per line, and in UTF-8 format, e.g.:
See the included word lists for samples. The alphabetic order in the file doesn’t matter. The program will ignore diacriticts in its searches (i.e. acção = accao). You can use wildcards like % and . in your searches:
- “%cao” returns everything that ends in “cao” (or ção, since diacritics are ignored)
- “a..ba” returns everything that starts with “a”, then two random letters, and ends with “ba”
- The query “….” returns all four-letter words.
Here’s the tool for download: Dict.zip (2.1 MB).
If you don’t have the .NET framework installed, you can get version 2.0 here (higher versions will also work – I tried to keep the requirements low).
As a bonus: this (PDF, 286 KB) is something that was made using with gathered using this tool.
Did this article help you out? Please help us find more time to write useful guides & articles like this by donating a buck or two. It'll keep us coffee-fueled. Thanks!