All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
SQL循序渐进(1)介绍SQL_[SQL,Server教程]
动态网页技术PHP的数组处理函数库_php资料_编程技术
C#网络应用编程基础练习题与答案(九)_[Asp.Net教程]
ASP.NET&Spring.NET&NHibernate最佳实践(六)——第3章人事子系统(3)_[Asp.Net教程]
asp.net结合js的网页打印程序_[Asp.Net教程]
剖析SQL Server 2005查询通知之基础篇_[SQL Server教程]
visual c++ 中抽象类与纯虚函数的用法
AJAX、AJAX实例及AJAX源代码(asp)_[AJAX教程]
C#教程:C#调用其他编程语言编写的DLL
HTML语言:什么是Unicode?什么是UTF-8?_[Html教程]
Reading number is top 10 pictures
Small s breast enhancement demonstration
到南昌西站了2
Fender Bender that so horrifying1
超强高考作文
这才叫绝色美女1
Female model behind the bitterness, often being overcharged5
奇趣的世界记录3
Beauty is thus produced
In the world the most mysterious 21 place landscape1
性感丰满身材火爆de美女2
Download software ranking
Call Of Duty2
Ashlynn Video2
塘西风月痕
Desire a peach blossom
Love the forty days
星际争霸1.08硬盘免安装版
WebService在.NET中的实战应用教学视频 → 第2集
Kung.Fu.Panda.2
Tram sex maniac 2 (H) rar bag18
圣殿祭司的ASP.NET.2.0.开发详解-使用C#
delv published in(发表于) 2014/1/6 9:10:11 Edit(编辑)
利用正则表达式自动给Email地址和Url加上连接_[Asp.Net教程]

利用正则表达式自动给Email地址和Url加上连接_[Asp.Net教程]

利用正则表达式自动给Email地址和Url加上连接_[Asp.Net教程]

using System;


using System.Text.RegularExpressions;


namespace CommLayer


{


///


/// 自动给邮件地址或email地址加上url


///


public class HyperlinkUrl


{


private static Regex urlregex = new Regex(@"(http:\/\/([\w.]+\/?)\S*)",


RegexOptions.IgnoreCase|RegexOptions.Compiled);


private static Regex emailregex = new Regex(@"([a-zA-Z_0-9.-]+\@[a-zA-Z_0-9.-]+\.\w+)",


RegexOptions.IgnoreCase|RegexOptions.Compiled);



public HyperlinkUrl()


{


}


///


/// 生成带连接的字符串


///


/// 需要生成带连接地址的字符串


/// 经过转换的字符串


public static string GenHyperlinkUrl(string link)


{


link = emailregex.Replace(link, "1");


link = urlregex.Replace(link, "1");


return link;


}


}


}







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.