precompile regular expressions