急!用正则表达式提取一个网页网址的问题.在线等待
文本如下:
<span id= "_function_code_page "> <p align=right> <a style= "FONT-SIZE: 14px " href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445096.html "> [上一页] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445092.html "> [1] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445093.html "> [2] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445094.html "> [3] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445095.html "> [4] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445096.html "> [5] </a> [6] <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445098.html "> [7] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445099.html "> [8] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445100.html "> [9] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445101.html "> [10] </a> <br> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445102.html "> [11] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445103.html "> [12] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445104.html "> [13] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445105.html "> [14] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445106.html "> [15] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445107.html "> [16] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445108.html "> [17] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445109.html "> [18] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445110.html "> [19] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445111.html "> [20] </a> <br> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445112.html "> [21] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445113.html "> [22] </a> <a href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445114.html "> [23] </a> <a style= "FONT-SIZE: 14px " href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445098.html "> [下一页] </a> </p> </span> <!--page_info=23_6_445092--> </p>
<p> 相关专题: <a href=/nz/jyzb2/index.shtml target=_blank> 第二届警用装备展 </a> </p>
要求将下一页中的链接提取出来: <a style= "FONT-SIZE: 14px " href= "http://mil.news.sina.com.cn/p/2007-05-18/0737445098.html "> [下一页] </a>
最终结果要是:http://mil.news.sina.com.cn/p/2007-05-18/0737445098.html
------解决方案--------------------(? <=href= " ").+?(?= " "> \[下一页)
------解决方案--------------------[^ <]*\s*\[下一页\] </a>