Comment 4 for bug 251352

Revision history for this message
Anne Mohsen (anne-mohsen) wrote :

Now the try/except is outside of the loop.
There is already a re.compile call:
searchRE = re.compile(search, re.IGNORECASE)
But searchRE is a LazyRegex object, and is really compiled only at the first call of the search method.
searchRE.search("") is a way to force it to be compiled outside of the loop, without explicitly importing lazy_regex.