![]() |
如何从html标签提取超链接文本?
给定一个包含'blabla [URL="https://www.labfans.com/bbs/admincp/address"]text[/URL] blabla'的字符串,我想从中提取'text' 。
[URL="https://www.mathworks.com/help/matlab/ref/regexp.html"]regexp[/URL] doc建议使用'.*'表达式,但它将提取整个 ... 内容。 当然,我可以像这样继续使用strfind : line = 'blabla [URL="https://www.labfans.com/bbs/admincp/address"]text[/URL] blabla'; atag = regexp(line,'.*','match', 'once'); from = strfind(atag, '>'); to = strfind(atag, ' |
所有时间均为北京时间。现在的时间是 21:33。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.