首页新闻找找看学习计划

关于正则取值

0
悬赏园豆:20 [已解决问题] 解决于 2013-03-19 09:39

 有段html代码  <table border="0" cellpadding="5" cellspacing="0" width="100%" class="ms-listviewtable"><tr><th class="ms-vh2">No</th><th class="ms-vh2">Name</th><th class="ms-vh2">Description</th><th class="ms-vh2">File Revision</th><th class="ms-vh2">File Size</th></tr><tr><td class="ms-vb2">1</td><td class="ms-vb2"><a href="http://sharenet.hqcec.com/dms/default.aspx?link=pw%3A%5C%5Cpw-int-hqbj%3Apw%5CDocuments%5C5043E%5C(C)%3A%20Exchange%20Area%5C02.%20Engineering%5C03%20Water%20Process%5C0002-00-15-B-E-3-33-001_PB%5C0002-00-15-121-B-E-3-33-001_PB%20COVER.doc" target="_blank">0002-00-15-121-B-E-3-33-001_PB COVER.doc</a></td><td class="ms-vb2">0002-00-15-121-B-E-3-33-001_PB COVER</td><td class="ms-vb2"></td><td class="ms-vb2">180224</td></tr><tr><td class="ms-vb2">2</td><td class="ms-vb2"><a href="http://sharenet.hqcec.com/dms/default.aspx?link=pw%3A%5C%5Cpw-int-hqbj%3Apw%5CDocuments%5C5043E%5C(C)%3A%20Exchange%20Area%5C02.%20Engineering%5C03%20Water%20Process%5C0002-00-15-B-E-3-33-001_PB%5C0002-00-15-121-B-E-3-33-001_PB.xls" target="_blank">0002-00-15-121-B-E-3-33-001_PB.xls</a></td><td class="ms-vb2">0002-00-15-121-B-E-3-33-001_PB</td><td class="ms-vb2"></td><td class="ms-vb2">204800</td></tr></table>  想办法取出所有<a>标签求里的href的值,后台实现

miloss的主页 miloss | 菜鸟二级 | 园豆:254
提问于:2013-03-18 15:55
< >
分享
最佳答案
0

(?<=<a[^>]+?href=")[^>]+?(?=\")

收获园豆:20
只会造轮子 | 老鸟四级 |园豆:2448 | 2013-03-18 18:30

这正则复制到代码里报错啊 加上编译符号也是的

miloss | 园豆:254 (菜鸟二级) | 2013-03-19 09:09
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册