Regular Expression

Posted by Malcolm on Stack Overflow See other posts from Stack Overflow or by Malcolm
Published on 2010-03-02T11:43:12Z Indexed on 2010/03/11 18:49 UTC
Read the original article Hit count: 260

Filed under:
|
|
|

I want regular expression that checks that the string doesnt start with an empty space.

Some what like this i want to do :

Is the below ValidationExpression right for it :

string ValidationExpression = @"/^[^ ]/";

if (!String.IsNullOrEmpty(GroupName) && !Regex.IsMatch(GroupName, ValidationExpression))
{    
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET