【发布时间】:2012-10-23 06:54:50
【问题描述】:
我正在使用
(?<=Activties</h3>)[\w\s\/\,\-\.]*
从这里提取文本,但我只得到第一行。我想捕捉所有线条,直到下一个“h3 风格”。 “br”是否被捕获并不重要
<h3 style="margin: 10px 0px 0px;">Beach Type</h3> sand <h3 style="margin: 10px 0px 0px;">Facilities</h3> Cafes/restaurant<br>Toilets<br>Disabled toilets<br> <h3 style="margin: 10px 0px 0px;">Activities</h3> Swimming<br>Fishing<br>Snorkeling<br> <h3 style="margin: 10px 0px 0px;">Nature and Wildlife</h3> Grandes Rocques is located at the start of Guernsey's 14km west coast footpath and cycle route. Port Soif Nature Trail and the Saumarez Nature trail are also located nearby. There is a diverse range of wildlife here. The first live Green Turtle to be rec <h3 style="margin: 10px 0px 0px;">Parking</h3> 200 spaces are available <h3 style="margin: 10px 0px 0px;">Water Quality</h3> Excellent <h3 style="margin: 10px 0px 0px;">Lifeguard</h3> No <h3 style="margin: 10px 0px 0px;">Cleaning and Litter</h3> The beach is cleaned daily by hand in the summer and twice a week in winter. There are litter and dog bins present. <h3 style="margin: 10px 0px 0px;">Awards and Recommendations</h3> Marine Conservation Society Recommended<br>
任何帮助将不胜感激。 感谢观看
欧米茄
【问题讨论】:
-
使用 HTML Agility Pack 代替正则表达式解析。检查此链接。htmlagilitypack.codeplex.com