Allow whitespacd and non-whitespace in Regular Expression
398081Oct 23 2003 — edited Oct 27 2003Hi,
I have a Regular Expression that will match the format a
user provides in a textbox.
Ex. User types Brown,Joe in the textbox
I would like the expression to have allow whitespace and
non-whitespace options after the comma.
Any suggestions or maybe another Regular Expression that will allow the option of having a space or no space after a comma would be appreciated.
Thanks.
Where would I post this topic under? I tried looking for General Visual Studio .NET to ask this question.
bebop
Regular Expression I'm using:
Regex regex4 = new Regex("^[A-Z][a-zA-Z]*\\,+\\S+(|\\S)+
([a-zA-Z]*)$");