exec sp_GetCustomerInfo @CityId,@CustomerName,@CustomerTel,@GroupId,@append,@pagesize,@pageindex,@docount字符截取
最终得到
@CityId
@CustomerName
@CustomerTel
或
这样
CityId
CustomerName
CustomerTel
的一个字符串数组 ???
select * from Customer where HomePhone=@Phone or OtherPhone=@Phone or MobilePhone=@Phone又如这样的???
------解决方案--------------------------------------------------------
Regex re14 = new Regex(@ "@(? <par> [^,\s)]*)[,\s)] ");
MatchCollection mc1 = re14.Matches( "exec sp_GetCustomerInfo @CityId,@CustomerName,@CustomerTel,@GroupId,@append,@pagesize,@pageindex,@docount ");
for (int j = 0; j < mc1.Count; j++)
{
Response.Write( " </br> par: " + mc1[j].Groups[ "par "]);
}
另外需要在待匹配的字符串最后加一个空格 :)