using System.Text.RegularExpressions;
namespace DeviceRepairAndOptimization.Utils
{
public class RexEX
{
///
/// 匹配输入的是否为邮箱
///
///
///
public static bool EmailMatch(string input)
{
return Regex.IsMatch(input, @"\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}");
}
///
/// 匹配输入的是否为手机号码
///
///
///
public static bool TaxMatch(string input)
{
return Regex.IsMatch(input, @"0?(13|14|15|18|17)[0-9]{9}");
}
}
}