Replacing Sub-Strings Within a String
Problem
You want to replace a sub-string with a new sub-string.
Solution
Split the string using the sub-string you want to remove as a delimiter. Then re-join using the new sub-string as the delimiter.
Discussion
You can also use regexes. If you’re matching an exact string, this way is simpler and 10x faster.
If you use regexes, remember that you must escape certain characters.