在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
<!--要替换内容-->
<li><a href="/xxx/2008-11-19/2934.html" target=_blank>xxxxxx</a></li> <li><a href="/xxx/2008-11-19/2935.html" target=_blank>xxxxxx</a></li> <li><a href="/xxx/2008-11-20/2936.html" target=_blank>xxxxxx</a></li> <!--替换后的结果--> <li><a href="/xxx_2008-11-19_2934.html" target=_blank>xxxxxx</a></li> <li><a href="/xxx_2008-11-19_2935.html" target=_blank>xxxxxx</a></li> <li><a href="/xxx_2008-11-20_2936.html" target=_blank>xxxxxx</a></li>
将超链接的内容“/”替换为“_”
str = Regex.Replace(str, @"href=""\/([^""]+)""", new MatchEvaluator(delegate(Match m) { return "href=\"/" + m.Groups[1].Value.Replace("/", "_") + "\""; }));
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论