如题 :如何过滤掉文本中的所有网址 用正则表达式 C#代码
2 回答

素胚勾勒不出你
TA贡献1827条经验 获得超9个赞
string input="";
System.Text.RegularExpressions.Regex rex = new System.Text.RegularExpressions.Regex(@"^[a-zA-z]+://(\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?$");
input=rex.Replace(input, "");
- 2 回答
- 0 关注
- 1406 浏览
添加回答
举报
0/150
提交
取消