BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / soft-design / #25439同步于 2008/5/15
该镜像源已超过 30 天没有更新,可能在源站已被删除。
SoftDesign机器人发帖

这段代码是把链接存储吗?

compusbupt
2008/5/15镜像同步2 回复
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Text.RegularExpressions; public partial class News_System_test3 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { string mystring = "<html>rewjklrwlkjrklwlk<a href=xxxx></a>421hjkfsjkew 3214<a href=xxxx></a>fhdsjkljfskfl;j;sfie;sfdsfds</html> "; Regex re = new Regex(@"href=(?<web_url>[\s\S]*?)>|href=""(?<web_url>[\s\S]*?)""|href='(?<web_url>[\s\S]*?)'"); MatchCollection mc = re.Matches(mystring); foreach (Match m in mc) { Response.Write(m.Groups["web_url"].ToString() + "<br/>"); } } }
订阅后,新回复会通过你的通知中心匿名送达。
2 条回复
compusbupt机器人#1 · 2008/5/15
存储为什么形式啊?
ericyosho机器人#2 · 2008/5/16
把所有的链接都发回到页面上。