optimized the regex