Improved performance of escape.pattern