« Scrabble Card Box Guide (part 1) | Hoot Settings » |
Creating Useful Pattern Searches in Hoot
Hoot has many search options/types including Length, Anagrams, Prefixes, and Contains. With the exception of anagrams and the like, you can use a pattern search to execute those searches. The app help file has some help and the online pattern has an extensive section on regular expressions, the basis of pattern searches.
Basics
Below are a few help searches you might use often, but first consider the basics.
Length: To search for words of a certain length, use that many question marks
??? will find all three letter words
Contains: To search for all words containing a certain letter, put that letter between two asterisks. An asterisk represents 0 or more characters.
*F* will find all words containing an F
Pre/Suffixes: Similarly, search for words beginning with a certain letter or ending, use an asterisk and the beginning or ending.
P* shows all words beginning with a P
*IENT shows all words ending in IENT
Basic Pattern: If you want to find a word that fits a certain pattern, you can do that by mixing asterisks and the letters you are looking for.
P*F*IENT will show four words in CSW19 including PROFICIENT
Ideally you should set lengths in your search parameters first for more a efficient search.
Special Patterns
Getting into more complex territory, you will need to learn a few new characters or symbols.
Square Brackets
[ ] Contains any one of the characters within the brackets
*[KM]* will search for words containing either a K or M.
[JQXZ]* will search for words beginning with either JQXZ
^ within a bracket means to search for any character at that position except what follows
*[^KM] will search for words that do not end in K or M.
To this point, most of these characters are a part of the regular expression engine within the database, though Hoot has modified a few for Scrabble. For example, in true regex, a letter is denoted as a period but Hoot, and most other Scrabble tools use the question mark instead. Hoot also has a few characters that are replaced before searching.
Hoot Special Characters
Two types of Hoot replacements are numbers and the letters c and v. Hoot replaces these with the characters in square brackets. Thus, for c, Hoot replaces with [AEIOU], and for 8, Hoot replaces with [JX]. Note that the value replacement will be different for different languages or tile sets. Set that in Settings under Tile Set.
*cccc will search for words ending in four consonants.
Parentheses
In pattern searches, parentheses have two uses, grouping and back searching.
You can actually do two pattern searches at one time by grouping each and adding a pipe symbol between them.
(Q[^U]*)|(JN*) will search for words that begin with a Q that is not followed by a U AND words that begin with JN.
Using parentheses for grouping will allow you to search letters within a word based on previous letters.
(???)*\1 will find words that end with the same three letters that it begins with, such as ATLATL.
(?)(?)(?)(?)\3\2\1 will show words that are palindromes, or are spelled the same forward and backward, such as DEIFIED.
Sub Patterns
Another Hoot Special is the ability to use sub patterns. They may not be so useful, but it can be fun to try. A sub pattern is enclosed in angle brackets and returns the letter represented by the ? within the sub pattern. That is then used in the rest of the pattern search.
<B?R> returns either AORU
WH<B?R>T then becomes WH[AORU]T
which returns WHAT and WHOT
Search Faster
When Hoot searches for things like Anagrams, it can figure out what length of words to search. For pattern searches Hoot doesn't know what length words it needs to search so set the word length parameters to speed the search.