一个看似好简单其实系好复习既问题=.=
时间:2014-07-03
来源:互联网
最好能把抽出的红色结果贴在excel.
<p>q:<a href="http://hk.rdeeg/cat/1/3//aid/*http://hksdfangyeah.com">tsuihaassng</a><p>q:<a href="http://hk.rdeeg/cat/1/3//aid/*http://hkhangyeah.asfcom">tsuihassang</a><p>q:<a href="http://hk.rdeeg/cat/1/3//aid/*http://hkhaagngyeah.com">happyfridayss222</a><p>q:<a href="http://hk.rdeeg/cat/1/3//aid/*http://hkhangyageah.com">billykillerss1021</a><p>q:<a href="http://hk.rdeeg/cat/1/3//aid/*http://hkhangyeagh.com">hangysseah</a><p>q:<a href="http://hk.rdeeg/cat/1/3//aid/*http://bbc.tin.fokom">ssssab</a>
[ 本帖最后由 yy_happy 於 2014-6-17 04:08 PM 编辑 ]
作者: yy_happy 发布时间: 2014-07-03
我想批量抽出已红的字元(原本是黑色,红了是方便大家清楚),可以用任何方法,任何程式,如何抽出?
最好能把抽出的红色结果贴在excel.
q:tsuihaassngq:tsuihassangq:happyfridayss222q:billykillerss1021q: ...

Observing that 你每个要求字串被 ">" 及 "</a>" 包住.
So the solution is something like :
full_string := "<p>q:<a .................om">ssssab</a>"
loop
one_token := cut(@full_string,">","</a>")
if empty then
exit loop
else
print one_token
endif
end loop
作者: 111x111=12321 发布时间: 2014-07-03
Str= "<your text>"
Str = System.Text.RegularExpressions.Regex.Replace(Str, "<[^>]*>", vbCrLf)
作者: kckcp 发布时间: 2014-07-03
我想批量抽出已红的字元(原本是黑色,红了是方便大家清楚),可以用任何方法,任何程式,如何抽出?
最好能把抽出的红色结果贴在excel.
q:tsuihaassngq:tsuihassangq:happyfridayss222q:billykillerss1021q: ...
http://www.w3schools.com/xml/xml_xpath.asp
[ 本帖最后由 xianrenb 於 2014-6-17 05:54 PM 编辑 ]
作者: xianrenb 发布时间: 2014-07-03
foreach (Match m in matches)
{
Console.WriteLine("{0}", m.Groups["link"]);
}
作者: form5 发布时间: 2014-07-03
doc.Load(new StringReader(htmlString));
foreach(HtmlNode link in doc.DocumentNode.SelectNodes("//a[@href]"))
{
Console.WriteLine(link.InnerText);
}
作者: form5 发布时间: 2014-07-03
.net :
Str= ""
Str = System.Text.RegularExpressions.Regex.Replace(Str, "]*>", vbCrLf)
作者: form5 发布时间: 2014-07-03
Reg Expression 不是好复杂罢?
作者: pc_chai 发布时间: 2014-07-03
有心做…攞个notepad++都做得到

作者: skww 发布时间: 2014-07-03
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28