Page 1 of 1

RegExp in a form field

Posted: Wed Nov 03, 2004 3:11 pm
by Calimero
Here back be me hi.

// 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 !

...

Posted: Thu Nov 04, 2004 5:30 am
by Calimero
Anyone !?!?!?