求助用匹配网页中特定的内容

青城孤影 2012-03-15 05:51:02
我想提取其中不派送范围后边的地名

就是
"<strong>●城东区</strong>:朱家庄,互宁路,付家寨,大园山,村组。<br /><br /><strong>●城中区</strong>:总寨镇,南西山,村组。<br /><br /><strong>●城西区</strong>:彭家寨,海湖新区,村组。<br /><br /><strong>●城北区</strong>:大堡子镇,拥军路以西,(柴达木路495号以上),二十里镇青海大学以北,新号251号以上,老号75号以上。<br /><br /><strong>●湟中县。</strong><br /><br />【更新时间:2011-6-1 11:01_D】"

这样的内容,求高手指教.
<table width="100%" border="0" cellpadding="0" cellspacing="1" align="center">
<tr>
<td class="table_title" width="150">公司编号</td>
<td class="table_content">810000</td>
</tr>
<tr>
<td class="table_title">公司名称</td>
<td class="table_content">青海西宁公司</td>
</tr>
<tr>
<td class="table_title">所在省市</td>
<td class="table_content"><a href="fuwuwangdian_list.php?id=860971">青海省</a>,<a href="fuwuwangdian_list.php?shi=0971">西宁市</a></td>
</tr>
<tr>
<td class="table_title">联系电话</td>
<td class="table_content">0971-6251064, 6167067</td>
</tr>
<tr>
<td class="table_title">负责人</td>
<td class="table_content">张进明</td>
</tr>
<tr>
<td class="table_title">地址</td>
<td class="table_content">西宁市城西区兴海路79号</td>
</tr>
<tr>
<td class="table_title">派送范围</td>
<td class="table_content"><strong>●城东区</strong>:东关大街,大众街,八一西路,八一东路,八一中路,经济开发区,互助东路,互助中路,互助西路,建国路,建国南路,七一路(1-311号,2-294号),祁连路(1-137号,2-800号),北小街,南小街,夏都大街,五一路,花园北街,花园南街,共和路,共和南路。<br /><br /><strong>●城中区</strong>:东大街,西大街,北大街,南大街,南山路,滨河路,七一路,长江路,南川东路,城南新区。<br /><br /><strong>●城西区</strong>:胜利路,五四大街,西关大街,昆仑路,南川西路,五四西路,海晏路,新宁路,西川南路(双号到48号,单号到61号)。<br /><br /><strong>●城北区</strong>:小桥大街,朝阳西路,朝阳东路,祁连路,柴达木路(1-493号),生物园区,二十里铺,青海大学。<br /><br /><strong>●大通县</strong>:详情请点击<a href="http://222.73.105.210/www/fuwuwangdian_data.php?id=810004" target="_blank"><u><strong>西宁公司大通县分部810004</strong></u></a><br /><br /><strong>●平安县</strong>:详情请点击<a href="http://222.73.105.210/www/fuwuwangdian_data.php?id=810600" target="_blank"><u><strong>西宁公司平安县分部810600</strong></u><br /><br /></a><strong>●民和县</strong>:详情请点击<a href="http://222.73.105.210/www/fuwuwangdian_data.php?id=810005" target="_blank"><u><strong>西宁公司民和县分部81000<br /><br /></strong></u></a><strong>●湟源县</strong>:详情请点击<a href="http://222.73.105.210/www/fuwuwangdian_data.php?id=810005" target="_blank"><u><strong>西宁公司湟源县分部810005<br /><br /></strong></u></a>【更新时间:2012-2-10 11:05_D】</td>
</tr>
<tr>
<td class="table_title">不派送范围</td>
<td class="table_content"><strong>●城东区</strong>:朱家庄,互宁路,付家寨,大园山,村组。<br /><br /><strong>●城中区</strong>:总寨镇,南西山,村组。<br /><br /><strong>●城西区</strong>:彭家寨,海湖新区,村组。<br /><br /><strong>●城北区</strong>:大堡子镇,拥军路以西,(柴达木路495号以上),二十里镇青海大学以北,新号251号以上,老号75号以上。<br /><br /><strong>●湟中县。</strong><br /><br />【更新时间:2011-6-1 11:01_D】</td>
</tr>
<tr>
<td class="table_title">所开通的增值业务</td>
<td class="table_content"></td>
</tr>
<tr>
<td class="table_title">门店展示</td>
<td class="table_content">
</td>
</tr>
</table>
...全文
140 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
JoeBlackzqq 2012-03-17
  • 打赏
  • 举报
回复
直接用这个也可以:
(?<=<td .*?>不派送范围</td>\s*?<td .*?>).*?(?=</td>)

这个是通过对前面和后面作限定来选择结果的!
JoeBlackzqq 2012-03-17
  • 打赏
  • 举报
回复
<td .*?>不派送范围</td>\s*?<td .*?>(.*?)</td>

括号中的就是你要的!!
jiuchang 2012-03-17
  • 打赏
  • 举报
回复
直接用正则把“不派送范围”之前的内容删除即可
s/.*不派送范围<\/td>//
Gloveing 2012-03-15
  • 打赏
  • 举报
回复
找到"不派送范围"
抽取其后面的内容--在进行匹配
Gloveing 2012-03-15
  • 打赏
  • 举报
回复
不派送范围 。。不就是"不派送范围"后面的部分中提取所有的中文么?

37,741

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • WuKongSecurity@BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧