What is the problem in the documentation?
Here there are two examples, the first of which states:
Example: ""a:b:c:d".replace(/:/, "-") returns "a-b,c,d"
Note the extra quote at the start of the original example, as well as the : becoming , without explanation (when that is not what you get if you run that command).
Any suggested fixes?
The fix would be replacing it with
Example: "a:b:c:d".replace(/:/, "-") returns "a-b:c:d"
or
Example: "a,b,c,d".replace(/,/, "-") returns "a-b,c,d"
Have any context we can refer to?
It's on this page in the replace section.