Basic useage I: Matching words
In the following examples, we'll simply search for a string in all gramatical categories without filtering the results.
A search for the string "cat" means "Find any word containing these three consecutive letters". Hundreds of matches are returned: "catastrophic", "alley cat", "scathingly", "catch", etc.
Note that the string " cat" (there is a space character in front of the c) will only match compound words like "self catering" and "dairy cattle"; spaces count!
We can limit the matches to all words ending in "cat" by putting the special character "$" after our search string. Searching for "cat$" there are only 5 matches: "alley cat", "cat", "siamese cat", "wildcat" and "cat" (verb).
We can limit the matches to all words beginning in "cat" by putting the special character "^" before our search string. A search for "^cat" produces more than 50 matches: "catholic", "category", "cattle", "catch", etc.
Finally, as is logical, we can limit our results to the word "cat" by typing in "^cat$":
As mentioned earlier, with the Regex Dictionary you can use the special character $v to match any vowel and the character $c to match any consonant. So if we search for the string "^c$vt$", we'll match all words that begin with c, end in t and have one vowel in the middle: cat, cot and cut.
Let's change our previous search to allow any consonant at the end of the word, subsituting the t in our string with the special character $c ("^c$v$c$"). This means "Match any word beginning with c, followed by one vowel, and ending in any single consonant". Now we get a couple dozen matches, including cab, cod i cub.
Finally we'll search for words beginning in c, followed by two vowels ($v$v) and ending in any single consonant: ("^c$v$v$c$"). The matches include cool, coal, coin and coax.
Note that if we remove the initial ^, we'll match any word ending in "c + 2 vowels + 1 consonant" (oficial, raincoat, scoot, etc.). If we remove only the final $, we'll match any word beginning "c + 2 vowels + 1 consonant" (caught up, courtship, cease, etc.). Finally, removing both the beginning and ending restrictions we can match uncousinly and musicianship.
|