日期:2014-05-17 浏览次数:20755 次
string s = "BJ|001|Q31,500,2000#Q24,500,2000#Q04,600,2500#Q35,650,2500#Q48,700,3200#Q42,750,3500#Q66,800,4000#Q80,800,4000#Q59,800,4000#Q73,800,4000#W77,800,4000#W21,800,4000#W84,800,4000#W38,800,4000#W91,800,4000#W45,800,4000#W07,800,4000#W52,800,4000#W14,800,4000#W69,800,4000#B36,100,9000#B50,100,9000#B74,100,9000#B98,100,9000#B43,100,9000#B67,100,9000#B81,100,9000#B04,100,9000#"; bool result = Regex.IsMatch(s, @"(?i)\w+\|\d+\|(?:[a-z]\d{2},\d+,\d+#)+"); Response.Write(result);