Improving performance of regex replacement for large log lines