C#正则表达式验证数字
static bool IsNumeric(string str) 
{  
   System.Text.RegularExpressions.Regex reg1 
       = new System.Text.RegularExpressions.Regex(@"^[-]?\d+[.]?\d*$");  
   return reg1.IsMatch(str); 
}

转载于:https://www.cnblogs.com/muliangcong/archive/2008/11/30/1344121.html

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐