To clarify this even further, let's consider an example. Say you have a list of words that all begin with the same letter: deep, deer, deescalate, deface, de facto, defalcate, defame, defat, default, defeat, de haut en bas, Dei gratia, déjà vu. If you wanted all words that do not being with the Latin preposition de, how would you find them? Give a minimum threshold of 3. For purposes of illustration, what if you wanted only words that fit that minimum threshold and had a vowel in the fifth position? You have to tack on an extra piece of regex as follows:
>>> import re
>>> list = ("deep", "deer", "deescalate", "deface", "de facto", "defalcate", "defame", "defat", "default", "defeat", "de haut en bas", "Dei gratia", "déjà vu")
>>> x = re.compile("^\S{3,5}.[aeiou]")
>>> for i in list:
... if re.match(x, i):
... print i
...
deescalate
deface
defalcate
defame
default
defeat
If we wanted to leave off the vowel requirement but only wanted three or more whitespace characters, the regex could be "\S{3,}". Like list addresses and other ranges, the curly brace syntax allows for implied infinity at either end.
If you are a bit unclear on how the matches were made, compare those items matched to the unmatched items to find a pattern. Then compare that pattern to the regular expression. You might also play with the numbers of the range to see how the hits change. If you are still thrown by all of this, we discuss how this regular expression works and how to form regex formulae on the next page.

