如題 :如何過濾掉文本中的所有網(wǎng)址 用正則表達式 C#代碼
2 回答

弒天下
TA貢獻1818條經(jīng)驗 獲得超8個贊
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 關注
- 437 瀏覽
添加回答
舉報
0/150
提交
取消