您的位置:首页 > 编程语言 > C#

C# 判断字符串是否是22位数字

2017-05-25 16:18 344 查看
    

   protected bool IsNumeric(string tempstr)//如果是,返回true

        {

             System.Text.RegularExpressions.Regex rex = new System.Text.RegularExpressions.Regex(@"^\d{22}$");

             return (rex.IsMatch(tempstr));
        }

参考地址:http://www.cnblogs.com/laoxian/archive/2010/04/30/1724677.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: