I need a regular expression for RegularExpressionValidator to validate a name.
At the moment it is [A-Za-z'\ ]+ . Now the requirement is user name can end with hyphen, and just one hyphen and nothing after that.
So name can be john-, but not -john and not john–
^at the beginning and\-?$at the end should work: