hi there,
i have been asking this question every time.

public bool ValidateTelNo(string TelNo)
            bool value = false;

                string rePhoneNumber = @"[1-9]\d{2}\s?\d{3}\d{4}$";
                string PhoneNoFormat = @"\([1-9]\d{2}\)\s?\d{3}\-\d{4}$";

                Regex re = new Regex(rePhoneNumber);
                Regex re1 = new Regex(PhoneNoFormat);

                if (re.IsMatch(TelNo) || (re1.IsMatch(TelNo)))
                    value = true;

                    value = false;


            return value;

in the above code can someone explain rePhoneNumber and PhoneNoFormat ?
what are the valeus that it takes in and what charaters (int string or special)


This article has been dead for over six months. Start a new discussion instead.