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
Post a Comment