compile regexes for perf and case insensitivity