I know from a tutorial that the regular expression ^[A-Z]+[a-zA-Z''-'\s]*$
matches a string of letters not including whitespace. I know that \s
means whitespace. Why when using this in validation for a field in MVC do I have to put[RegularExpression(@"^[A-Z]+[a-zA-Z''-'\s]*$")]
?
What is the meaning of the two single quotes and the single quote round the hyphen before the \s?