optimized regular expressions with compile