I need to write a regular expression for form validation that allows spaces within a string, but doesn\'t allow only white space.
For example - \'Chicago Heigh
\'Chicago Heigh
Try this regular expression:
^[^\s]+(\s.*)?$
It means one or more characters that are not space, then, optionally, a space followed by anything.