var str=' <a href="http://202.108.23.172/m?ct=134217728&tn=baidusg,喜欢你  &word=mp3,http://jitafan.com/mp3/BEYOND/YmUz.mp3,,'
      +'[%CF%B2%BB%B6%C4%E3]&si=%CF%B2%BB%B6%C4%E3;;beyond;;31806;;31806&lm=16777216" title="请点击左键!来源网址:  http://jitafan.com '
      +'  请参照百度权利声明使用" onclick="return ow(event,this)"  target="_blank"> <font style=color:#e10900>喜欢你 </font>   </a> </td>'
      +'<td> <a href="http://mp3.baidu.com/singerlist/beyond.html" target="_blank">beyond </a>&nbsp; <a href="http://mp3.baidu.co'
      +'m/singerlist/.html" target="_blank"> </a>&nbsp;'
  var Reg=/<a\s+href=['"]([^'"]+)['"]/gi
  while(m=Reg.exec(str))
    alert(m[1])

解决方案 »

  1.   

    /(.*?href=('|"")?)(.*?)('| |"")(.*?歌词)<\/a>/ig
    $3为所需要的。
      

  2.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title> New Document </title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <script type="text/javascript">
    window.onload = function(){
    var strHTML = document.getElementById("bodyHTML").value;
    var re = /(<a.{1,}<\/a>)|(<img.{1,}\">)/g;
    strHTML.replace(re ,function(s){
    alert(s);
    });
    };
    </script>
    </head>
    <body>
    <textarea id="bodyHTML" style="width:800px;height:500px;" readonly>
    <tr> 
    <td class=tdn>1 </td>
    <td class=d> <a href="http://202.108.23.172/m?ct=134217728&tn=baidusg,喜欢你   &word=mp3,http://jitafan.com/mp3/BEYOND/YmUz.mp3,,[%CF%B2%BB%B6%C4% E3]&si=%CF%B2%BB%B6%C4%E3;;beyond;;31806;;31806&lm=16777216" title ="请点击左键!来源网址:  http://jitafan.com   请参照百度权利声明使用" onclick="return ow (event,this)"  target="_blank"> <font style=color:#e10900>喜欢你 </font>   </a> </td>
    <td> <a href="http://mp3.baidu.com/singerlist/beyond.html" target="_blank">beyond </a>&nbsp; <a href="http://mp3.baidu.com/singerlist/.html" target="_blank"> </a>&nbsp; <a href="http://mp3.baidu.com/singerlist/.html" target="_blank"> </a>&nbsp; </td>
    <td class=al> <a href="http://mp3.baidu.com/albumlist/beyond;;;;;;%C3%D8%C3%DC%BE%AF %B2%EC.html" target="_blank">秘密警察 </a>&nbsp; </td>
    <td> <a href="http://box.zhangmen.baidu.com/m?gate=1&ct=134217728&tn =baidumt,喜欢你  &word=mp3,http://jitafan.com/mp3/BEYOND/YmUz.mp3,,[%CF %B2%BB%B6%C4%E3]&si=%CF%B2%BB%B6%C4%E3;;beyond;;31806;;31806&lm=16777216" onclick ="return ot(event,this,'31806')">试听 </a>&nbsp; </td>
    <td> <a href="http://mp3.baidu.com/m?tn=baidump3lyric&word=beyond+%CF%B2% BB%B6%C4%E3&ct=150994944&lm=-1&lf=3" target="_blank">歌词 </a>&nbsp; </td>
    <td> &nbsp; </td>
    <td>10.6 M </td>
    <td>mp3 </td>
    <td class=spd> <img src="http://img.baidu.com/img/mp3/d9.gif"> </td>
    </tr> <tr>
    里的 <td> <a href="http://mp3.baidu.com/m?tn=baidump3lyric&word=beyond+%CF%B2% BB%B6%C4%E3&ct=150994944&lm=-1&lf=3" target="_blank">歌词 </a>&nbsp; </td>
    </textarea>
    </body>
    </html>