><之间的数据就是你要的阿

解决方案 »

  1.   

    用js 脚本可以实现,  比如 
    <script language="Javascript">
    function export_a(the_a)
    {
    var the_content="";

    the_content=the_a.innerHTML; //这个是标签里面的文本 var newwin=window.open("about:blank","_blank","");
    newwin.document.open(); newwin.document.write(the_content); newwin.document.close();
    newwin=null;
    }
    </script>
    其他的部分,你自己改改,反正这样就可以提取文字了!
      

  2.   

    呵呵,好像有专门解析html的东东
      

  3.   

    可以自己做一个自定义函数,用来去除<>和</>
      

  4.   

    自定义函数解析html标记其实并不难
    大概100行的函数就可以了
    你可以排除<>之内的内容,把剩下的留下
      

  5.   


     private String removehtmltag(String htmlstr) {
         Pattern pat = Pattern.compile("\\s*<.*?>\\s*",
                                      Pattern.DOTALL | Pattern.MULTILINE |
                                      Pattern.CASE_INSENSITIVE); 
        Matcher m = pat.matcher(htmlstr);
        //再去掉其它所有html标记
        String rs = m.replaceAll(" ");
        rs = rs.replaceAll("&nbsp", " ");
        rs = rs.replaceAll("&lt;", "<");
        rs = rs.replaceAll("&gt;", ">");
        return rs;
      }
      

  6.   

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    var str='<a herf="www.sohu.com">sohu</a>sohu:<a herf="www.sina.com.cn">sohu</a>sina:<a '+ 'herf="www.ssina.163.com">163</a>163';
    str=str.replace(/<[^\/]*>([^<>]*)<\/\w>/img,"");
    alert(str);
    //-->
    </SCRIPT>