How can I remove extra white space (i.e. more than one white space character in a row) from text in JavaScript?
E.g
match the start using.
Using regular expression.
var string = "match the start using. Remove the extra space between match and the"; string = string.replace(/\s+/g, " ");
Here is jsfiddle for this