饼子天空  
个人程序Blogs

2011年10月27日

摘要: C#中使用正则表达式验证电话号码、手机号、身份证号、数字和邮编C#中使用正则表达式验证电话号码、手机号、身份证号、数字和邮编验证电话号码的主要代码如下:publicboolIsTelephone(stringstr_telephone){returnSystem.Text.RegularExpressions.Regex.IsMatch(str_telephone,@"^(\d{3,4}-)?\d{6,8}$");}验证手机号码的主要代码如下:publicboolIsHandset(stringstr_handset){returnSystem.Text.RegularEx 阅读全文
posted @ 2011-10-27 19:30 饼子天空 阅读(265) 评论(0) 推荐(0) 编辑