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
you can use this