Optimized regex