Personally, I would leave it as is. If you worry about the duplication of the replacement part, put that into a variable. The three substitutions are simpler than the combined pattern. And it might even be faster (as it's more likely the optimizer can do it all in the 3-statement case than in the big regexp case).