I need to validate a Textbox in my Asp.Net application where the user can enter mobile number and it should starts with 078 and should contain 10 digits.
Sample:
0781234567
here is my code
public static bool CheckPhoneNum(string strPhoneNumber)
{
string MatchPhoneNumberPattern = "/^(?=\\d{10,11}$)(07)\\d+/";
if (strPhoneNumber!= null) return Regex.IsMatch(strPhoneNumber, MatchPhoneNumberPattern );
else return false;
}
but it always returns false.