Do gsub with a regexp instead of a string
Merge pull request #17308 from pabloh/small_optimizations

Faster to call `gsub` with a regexp literal than a string literal
Configure TravisCI.