1.得到網頁上的鏈接地址:
string matchString = @"<a[^>]+href=\s*(?:'(?<href>[^']+)'|""(?<href>[^""]+)""|(?<href>[^>\s]+))\s*[^>]*>";
2.得到網頁的標題:
string matchString = @"<title>(?<title>.*)</title>";
string matchString = @"<title>([\S\s\t]*?)</title>";
3.去掉網頁中的所有的html標記:
string temp = Regex.Replace(html, "<[^>]*>", "");
4.js去掉所有html標記的函數:
function delHtmlTag(str) { return str.replace(/<[^>]+>/g,"");//去掉所有的html標記 }