最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
实现网址的自动识别
时间:2022-07-02 12:08:25 编辑:袖梨 来源:一聚教程网
public static string Auto(string str)
//========================//
// www.
// http://
// ftp://
// [email protected]
// mms://
//========================//
{
Reg = new Regex("([^]=>])(http://*[*A-Za*-z0-9./=?%-&_~`@':+!]+)");
str = Reg.Replace(str,"$1");
Reg = new Regex("^(http://*[*A-Za*-z0-9./=?%-&_~`@':+!]+)");
str = Reg.Replace(str,"");
Reg = new Regex("(http://*[*A-Za*-z0-9./=?%-&_~`@':+!]+)$");
str = Reg.Replace(str,"");
Reg = new Regex("([^]=>])(ftp://[A-Za-z0-9./=?%-&_~`@':+!]+)");
str = Reg.Replace(str,"$1");
Reg = new Regex("^(ftp://[A-Za-z0-9./=?%-&_~`@':+!]+)");
str = Reg.Replace(str,"");
Reg = new Regex("(ftp://[A-Za-z0-9./=?%-&_~`@':+!]+)$");
str = Reg.Replace(str,"");
Reg = new Regex("([^]=>])(mms://[A-Za-z0-9./=?%-&_~`@':+!]+)");
str = Reg.Replace(str,"$1");
Reg = new Regex("^(mms://[A-Za-z0-9./=?%-&_~`@':+!]+)");
//========================//
// www.
// http://
// ftp://
// [email protected]
// mms://
//========================//
{
Reg = new Regex("([^]=>])(http://*[*A-Za*-z0-9./=?%-&_~`@':+!]+)");
str = Reg.Replace(str,"$1");
Reg = new Regex("^(http://*[*A-Za*-z0-9./=?%-&_~`@':+!]+)");
str = Reg.Replace(str,"");
Reg = new Regex("(http://*[*A-Za*-z0-9./=?%-&_~`@':+!]+)$");
str = Reg.Replace(str,"");
Reg = new Regex("([^]=>])(ftp://[A-Za-z0-9./=?%-&_~`@':+!]+)");
str = Reg.Replace(str,"$1");
Reg = new Regex("^(ftp://[A-Za-z0-9./=?%-&_~`@':+!]+)");
str = Reg.Replace(str,"");
Reg = new Regex("(ftp://[A-Za-z0-9./=?%-&_~`@':+!]+)$");
str = Reg.Replace(str,"");
Reg = new Regex("([^]=>])(mms://[A-Za-z0-9./=?%-&_~`@':+!]+)");
str = Reg.Replace(str,"$1");
Reg = new Regex("^(mms://[A-Za-z0-9./=?%-&_~`@':+!]+)");
相关文章
- 三国望神州四面围城过关攻略 11-05
- 洛克王国世界精灵放生方法 11-05
- 洛克王国世界卡卡虫获取方法 11-05
- 崩坏星穹铁道3.7缇宝复刻抽取建议 11-05
- 永劫无间手游李寻欢强度如何 11-05
- 黑色信标巴拉莱卡有什么技能 11-05