c# - Regex to check if string only contain digits and is 11 characters/digits long? -


currently using:

if (regex.ismatch(searchvalue, @"^\d{11}.*") && searchvalue.length == 11)    {      //    } 

how can alter regex check length , not use && operator?

thanks in advance.

changing pattern to

@"^\d{11}$" 

should


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -