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 this:
str.replace(/\s+/g, ' ').trim()
If you don't have trim add this.
trim
Trim string in JavaScript?