Below is simple jQuery
code snippets to replace
all the dots (.) present on HTML page and then replace it with hyphen.
var strNewString = $('body').html().replace(/\./g,'-');
: Replace functions returns a string which contains the updated text. So you need to first assign into a variable and then re-assign it.
Instead of, (.) or "-", text can be anything. All you need is to make change in the replace function arguments and you are good to go.
Feel free to contact me for any help related to jQuery, I will gladly help you.