I have two regexes.
One is for no space at the beginning and end but there can be a space in between words:
^[^\s]+(\s+[^\s]+)*$
And the second one is for allowing some special characters:
([^\\~!@#$%^&*()+=?<>|/""]*)
Now, I want to combine both regex into a single regex.
I have tried with | sign suggested in another post but that is not working for me.
I am using ASP.NET MVC data annotations.
Valid are:
"A"
"A."
"A,"
"A'S"
Invalid are:
" A "
" A"
" B"
"A@"
"A!"