compile regexes first