摘要: 1 例子一 1 using System.Text.RegularExpressions; 2 3 4 string strTempDistrictID = txtDistrictID.Text; 5 6 //必须是[数字][数字][0000]格式 7 Regex re = new Regex("^[0-9]{2}[0]{4}$"); 8 Match match = re.Match(strTempDistrictID); 9 if (match.Success == false)10 {11 MessageBox.Show("地区代码(省份代码)必须是 \&qu 阅读全文
posted @ 2013-03-18 13:30 杨斌_济南 阅读(358) 评论(0) 推荐(0) 编辑