点击收缩查看代码
public static bool IsNumeric(string value)
{
return Regex.IsMatch(value, @"^[+-]?\d*[.]?\d*$");
}
public static bool IsInt(string value)
{
return Regex.IsMatch(value, @"^[+-]?\d*$");
}
public static bool IsUnsign(string value)
{
return Regex.IsMatch(value, @"^\d*[.]?\d*$");
}
public static bool isTel(string strInput)
{
return Regex.IsMatch(strInput, @"\d{3}-\d{8}|\d{4}-\d{7}");
}