最新下载
热门教程
- 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./=?%-&_~`@':+!]+)");
相关文章
- 下一站江湖2流光追影有哪些途径获得 09-16
- 失控进化雪山如何探索 09-16
- 地下城堡4骑士与破碎编年史艾洛拉有什么技能 09-16
- 逆战未来死神镰刀怎么获取 09-16
- 环外天赋如何觉醒 09-16
- 口袋斗罗大陆怎么玩 09-16