// Read the words backwards
My problem goes like this:
I have input in the text field, I succesfully removed some words on submit, but I have a problem if someone does this or this - puts lots of white spaces inside the input.
What is the code - pattern to match in the code below
var pattern = new RegExp("?????", gi);
The pattern should register if there are 2 or more "white" spaces together and replace them with only one white space.
The replacing I know, just the RegExp pattern.
Thanks Ahead !