111,097
社区成员




(?is)<a[^>]*?href=["'\s]*(?<href>[^"]*)[^>]*>(?<Value>.*?(?=</a>))
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace CSharpTest
{
class Program
{
static void Main(string[] args)
{
string str=@"<h3 class=r> <a href=""******111*"" class=l 。。。。。。)"">****222**** </a> </h3> ";
Regex re = new Regex(@".*?href=""(?<href>[^""]*)""[^>]*>(?<title>[^<]*).*?");
Console.WriteLine("{0} {1}", re.Match(str).Groups["href"].Value, re.Match(str).Groups["title"].Value);
}
}
}
(?<=\<a href=")[^"]*(?=")
(?<=\>)[^\<\>]*(?=\</a\>)