compile regexes once