I have some text which looks like this -
\" tushar is a good boy \"
Using javascript I want to remove all the extra white spac
Try:
str.replace(/^\s+|\s+$/, '') .replace(/\s+/, ' ');