C#正则表达式验证数字
static bool IsNumeric(string str)
{
System.Text.RegularExpressions.Regex reg1
= new System.Text.RegularExpressions.Regex(@"^[-]?\d+[.]?\d*$");
return reg1.IsMatch(str);
}
C#正则表达式验证数字
·
转载于:https://www.cnblogs.com/muliangcong/archive/2008/11/30/1344121.html
更多推荐
所有评论(0)