Use re.match instead of re.search, as it's much faster and gives the same results for our REs.