Regular Expression Helper Class

using System;
using System.Text.RegularExpressions;

namespace RickSchott.Util
{
///

/// Summary description for RegExValidators.
///

public class RegExValidators
{
public const string regPhoneNumber=@”^(?:([2-9]d{2}) ?|[2-9]d{2}(?:-?| ?))[2-9]d{2}[- ]?d{4}$”;
public const string regEmail = @”^[w-]+(?:.[w-]+)*@(?:[w-]+.)+[a-zA-Z]{2,7}$”;
public const string regZipCode = @”^(?(^00000(|-0000))|(d{5}(|-d{4})))$”;
public RegExValidators()
{
//
// TODO: Add constructor logic here
//
}
public static bool isValid(string input,string regConst)
{
return Regex.Match(input,regConst).Success;
}
}
}

3 Replies to “Regular Expression Helper Class”

  1. Get any Desired College Degree, In less then 2 weeks.

    Call this number now 24 hours a day 7 days a week (413) 208-3069

    Get these Degrees NOW!!!

    “BA”, “BSc”, “MA”, “MSc”, “MBA”, “PHD”,

    Get everything within 2 weeks.
    100% verifiable, this is a real deal

    Act now you owe it to your future.

    (413) 208-3069 call now 24 hours a day, 7 days a week.

Leave a Reply

Your email address will not be published. Required fields are marked *