# Dictionary with regular expressions searches?

**URL:** <https://boards.straightdope.com/t/dictionary-with-regular-expressions-searches/576711>\
**Category:** Factual Questions\
**Created:** [April 1, 2011, 2:34am UTC](https://boards.straightdope.com/t/dictionary-with-regular-expressions-searches/576711 "2011-04-01T02:34:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![CookingWithGas](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cookingwithgas/32/485_2.png) [@CookingWithGas](https://boards.straightdope.com/u/CookingWithGas)\
**Post date:** [April 1, 2011, 2:34am UTC](https://boards.straightdope.com/t/dictionary-with-regular-expressions-searches/576711/1 "2011-04-01T02:34:37Z")

</div>

Anyone know of an online English dictionary with regular expression searches? I would settle for a text-file dictionary that I could search with an editor (just a list of words).

I know of a dictionary that provides wildcard searches but the wildcard format is very simple.

(For those of you who don’t know what I’m talking about, regular expressions are a product of computer work, and is a syntax for string pattern matching. For example,  
^a[a-z][a-z][^e]\*e$  
will match a string that has “a” at the beginning of the line followed by any two letters, then any number of letters as long as they’re not “e”, then ending with “e”.)

---

<div class="post-metadata">

**Author:** ![J\_Cubed](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@J\_Cubed](https://boards.straightdope.com/u/J_Cubed)\
**Post date:** [April 1, 2011, 2:42am UTC](https://boards.straightdope.com/t/dictionary-with-regular-expressions-searches/576711/2 "2011-04-01T02:42:54Z")

</div>

This site has basic wildcard support, plus limiting by consonant or vowel:  
[http://www.onelook.com/](http://www.onelook.com/)

This site, interestingly, lets you favor a letter you’re only partially sure of:

> **[One Across - Crossword Answers, Crossword Solver, Dictionary Search, Anagram...](https://www.oneacross.com/)**
>
> Having trouble solving the last answer in that crossword puzzle? Having trouble getting the first answer? See if our search engine can help! Unlike pure pattern dictionary searches, we actually analyze the clue as well.

Also, you could just do “perl -e” with a one-liner regex and a Unix spell checker dictionary file as the input.

---

<div class="post-metadata">

**Author:** ![Fubaya](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@Fubaya](https://boards.straightdope.com/u/Fubaya)\
**Post date:** [April 1, 2011, 3:27am UTC](https://boards.straightdope.com/t/dictionary-with-regular-expressions-searches/576711/3 "2011-04-01T03:27:40Z")

</div>

> [@CookingWithGas](#):
>
> I would settle for a text-file dictionary that I could search with an editor (just a list of words).

Google “wordlist.” There are some that have a few hundred thousand words, and you can always combine them, then use your tool of choice.

---

<div class="post-metadata">

**Author:** ![tellyworth](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@tellyworth](https://boards.straightdope.com/u/tellyworth)\
**Post date:** [April 1, 2011, 3:39am UTC](https://boards.straightdope.com/t/dictionary-with-regular-expressions-searches/576711/4 "2011-04-01T03:39:47Z")

</div>

> [@CookingWithGas](#):
>
> Anyone know of an online English dictionary with regular expression searches? I would settle for a text-file dictionary that I could search with an editor (just a list of words).

If you have access to a Mac or Unix machine, you’ll probably have the tools you need right there: egrep and /usr/share/dict/words.

On my Mac, “egrep ‘^a[a-z][a-z][^e]\*e$’ /usr/share/dict/words” produced 1920 results.

---

<div class="post-metadata">

**Author:** ![Fubaya](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@Fubaya](https://boards.straightdope.com/u/Fubaya)\
**Post date:** [April 1, 2011, 3:47pm UTC](https://boards.straightdope.com/t/dictionary-with-regular-expressions-searches/576711/5 "2011-04-01T15:47:15Z")

</div>

> [@tellyworth](#):
>
> If you have access to a Mac or Unix machine, you’ll probably have the tools you need right there: egrep and /usr/share/dict/words.
> 
> On my Mac, “egrep ‘^a[a-z][a-z][^e]\*e$’ /usr/share/dict/words” produced 1920 results.

The wordlist there may not be as large as what can be found online. On Slackware, I have a puny 38k words and only 300 hits with that regex. I always get mine online so at least I know it isn’t the original unix wordlist from 1969 or something.

---

<div class="post-metadata">

**Author:** ![bibliophage](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bibliophage/32/7615_2.png) [@bibliophage](https://boards.straightdope.com/u/bibliophage)\
**Post date:** [April 1, 2011, 4:10pm UTC](https://boards.straightdope.com/t/dictionary-with-regular-expressions-searches/576711/6 "2011-04-01T16:10:48Z")

</div>

I know you can search the 1913 edition of Webster’s Revised Unabridged Dictionary this way. It was an excellent dictionary 98 years ago and still useful provided you keep in mind that it won’t return words invented in the last century. [http://machaut.uchicago.edu/classic/webster.form.html](http://machaut.uchicago.edu/classic/webster.form.html) Be sure to click on “floating search.”
