127
rated 0 times
[
133]
[
6]
/ answers: 1 / hits: 31995
/ 12 Years ago, thu, november 15, 2012, 12:00:00
I need help with regular expression.I need a expression in jquery which allows only character or space between two words. no double space allowed
I am using this
/^[a-zA-Z]+(-_ [a-zA-Z]+)*/
but it's not working.
Example
space hello - not allowed
hello space - not allowed
hello space space hello - not allowed
space hello space - not allowed
hello1234 - not allowed
hello space 1234 - not allowed
hello world-allowed
hello-allowed
hello how are you-allowed
More From » jquery