111,129
社区成员
发帖
与我相关
我的任务
分享
Regex.Replace(input, @"(?i)(?<=href="")http://((?!http)[^""])+(?="")", "http://www.abc.com/$&");
string str = @"XXXXXXXXXXXXXXXXXXXXXXhref=""http://www.baidu.com""XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
Regex reg = new Regex(@"(?<=href="").*?(?="")");
foreach (Match m in reg.Matches(str))
{
str = str.Replace(m.Value, @"http://www.abc.com/" + m.Value);
}
Console.WriteLine(str);
\"(http://\w+\.\w+\.\w+)"