如何在雅虎管道中制作正则表达式以消除从字段开头到特定单词的所有内容?
我正在从 youtube 上获取 rss,
http://www.youtube.com/rss/search/%s.rss
并希望提取视图计数并将其添加为单独的字段。视图计数位于描述字段中,并显示为:
<div><span style="color:#666666;font-size:11px;">Views:</span>
431</div>
在这种情况下,我需要提取的数字是 431。
谢谢,
彼得罗
PS:以下是最近搜索的描述的一部分。我没有放整个代码,因为它太长了。
<div style="font-size:12px;margin:3px 0px;"><span>a frankly shoddy cover of Susan Cadogan's big hit! Reminds me of my first 'squeeze' at The Hummingbird under 18's sesh, monkey boots, (couldn't afford Docs),fred perry t shirt and stapress 'champagne' 2 tone trousers robbed from Nelson House....................</span></div></td>
<td style="font-size:11px;line-height:1.4em;padding-left:20px;padding-top:1px;" width="146" valign="top"><div><span style="color:#666666;font-size:11px;">From:</span>
<a rel="nofollow" target="_blank" href="http://www.youtube.com/channel/UCZ0m4ZjZMNdOl4uyvrQm-yw">TheLastMehari</a></div>
<div><span style="color:#666666;font-size:11px;">Views:</span>
431</div>
<div style="white-space:nowrap;text-align:left;"><img style="border:0px none;margin:0px;padding:0px;vertical-align:middle;font-size:11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_empty_11x11.gif"> <img style="border:0px none;margin:0px;padding:0px;vertical-align:middle;font-size:11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_empty_11x11.gif"> <img style="border:0px none;margin:0px;padding:0px;vertical-align:middle;font-size:11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_empty_11x11.gif"> <img style="border:0px none;margin:0px;padding:0px;vertical-align:middle;font-size:11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_empty_11x11.gif"> <img style="border:0px none;margin:0px;padding:0px;vertical-align:middle;font-size:11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_empty_11x11.gif"></div>