Precompiling pattern regexes