Call gsub with a Regexp instead of a String for better performance

Benchmarks here: #17308