currently I am using:
if (Regex.IsMatch(searchValue, @"^\d{11}.*") && searchValue.Length == 11)
{
// Do something
}
How can I alter the regex to also check the length and not to use the && operator?
Thanks in advance.
Changing the pattern to
@"^\d{11}$"
Should do it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With