日期:2014-05-20  浏览次数:20665 次

如何用正则表达式,实现这样一个验证
如何用正则表达式,验证一个字符串中含有除8和11之外的其它数值,这些数值是用逗号分隔的,如"1,2,3,8,11,15"

------解决方案--------------------
这个建议用split分割到数组里做
------解决方案--------------------
代码如下:
string s="1,2,3,8,11,15";
int[] a=s.split(',');
foreach( string s in a)
{
console.writeen(a);
}