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

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -