直接这样使用吧。public string FilterData(string strcontent,string strfilter)
{
string[] s= strfilter.Split('|');
foreach(string key in s)
{
Re=Regex.Replace(strcontent,key,"");//出错,无法将string转化为regex
}
return Re.ToString(); }
{
string[] s= strfilter.Split('|');
foreach(string key in s)
{
Re=Regex.Replace(strcontent,key,"");//出错,无法将string转化为regex
}
return Re.ToString(); }
解决方案 »
- 如何在IIS7.0的网站下获取登陆用户名
- 如何让DataGrid绑定按钮,点击按钮获取该行的ID
- sql的注入问题???????
- 不使用AJAX组件/控件实现异步请求
- 用过UltraWebTree朋友进来帮忙:关于节点选择(checked)问题!!高分相送
- 新手提问:升级程序的打包问题?
- 弹出的新窗口是Https,关闭时提示“拒绝访问”,如何解决?
- 你门做图表的时候一般用什么控件?推荐几个,谢谢
- URL重写,新手请教!
- file操作,System.NullReferenceException: 未将对象引用设置到对象的实例。--在线等待
- 操作数据库,建立Conn的时候,是要使用一个类继承Dispose效率高还是每次手工关闭效率高?
- 一个关于ICollection CreateSource()的问题?兄弟们帮忙啊
{
Regex Re= new Regex(strcontent);
string[] s= strfilter.Split('|');
foreach(string key in s)
{
Re=(Regex)Re.Replace(key,"");//修改这里
}
return Re.ToString(); }