Instead of entering some text to be anagrammed, you can enter a pattern to find matching words in the current lexicon. As you type in a pattern the "Find Usable Words" button automatically changes to "Find Matching Words". Here are some example patterns:
| * | Find all words in the lexicon. | |
| *x* | Find words that contain the letter "x". | |
| !*x* | Find words that don't contain "x". | |
| ~*x* | Ditto (~ is equivalent to !). | |
| *ed | Find words ending with "ed". | |
| *(ed|ing) | Find words ending with "ed" or "ing". | |
| ??? | Find words with 3 letters. | |
| ?10 | Find words with 10 letters. | |
| ?7-10 | Find words with 7 to 10 letters. | |
| ?7- | Find words with at least 7 letters. | |
| ?-7 | Find words with at most 7 letters. | |
| *x*&*y* | Find words containing "x" and "y" in any order. | |
| [xyz]* | Find words starting with "x", "y" or "z". | |
| [!aeiou]- | Find words with no vowels. |
Let's look at some more complicated patterns. Note that spaces are ignored and can be used to make a long pattern more readable. This example will find all words containing a single "a":
This example finds all words containing "i" and "n" and "g" (in any order) but not ending in "ing":
NOTE: When using patterns with a numeric lexicon you need to enclose a repeat count in angle brackets to avoid any ambiguity. For example, if you want to find all 3-digit numbers then use the pattern "?<3>" rather than "?3" (the latter will find all 2-digit numbers ending with 3). Angle brackets can also be used in patterns for a non-numeric lexicon.
The above examples illustrate all of the special pattern characters:
| * | Match zero or more letters. | |
| ? | Match any single letter. | |
| [...] | Match any letter in the given list; eg. [abc]. | |
| [!...] | Match any letter NOT in the given list; eg. [!aeiou]. | |
| N | Specifies a fixed repeat count, where N is a non-negative integer. Repeat counts are only allowed after ?, ], or a letter; eg. ?9. | |
| M-N | Specifies a variable repeat count. M and N are optional non-negative integers indicating the minimum and maximum counts. If M is missing then 0 is assumed, and if N is missing then infinity is assumed. Note that * is equivalent to ?-. | |
| <...> | Any repeat count can be enclosed in angle brackets; eg. <2-5>. This form of a repeat count is necessary when using a numeric lexicon (where digits are valid "letters"). | |
| - | Used inside [...] to indicate a letter range; eg. [a-z], or to separate min and max repeat counts; eg. 2-5. | |
| (...) | Match a sub-pattern; eg. (a|b)*. | |
| | | Means OR. For matching alternative patterns; eg. a*|b*. | |
| & | Means AND. For matching combined patterns; eg. *a*&*b*. | |
| ! | Means NOT. Can only be the first character in the pattern or the first character after ( or [. | |
| ~ | Also means NOT. Useful when entering patterns on the agc command line. |
Patterns can also be typed into the Edit menu's "Find Word(s)" dialog to find and select matching words in the current list of usable/lexicon words.