日期:2014-05-17 浏览次数:20576 次
string s = ",比如http://style.sina.com.cn/industry/2012-10-08/1147106801.shtml 这种";
s = Regex.Match(s, @"[a-zA-z]+://[^\s]*").ToString();
System.Diagnostics.Debug.Print(s);
MessageBox.Show(s);
// 输出
// http://style.sina.com.cn/industry/2012-10-08/1147106801.shtml
------解决方案--------------------
(?i)https?://\S*?/\d+\.shtml