获得网页的内容,如http://www.newdruginfo.com/sms/ha001.htm里的正文内容
从 <table width='100%' border='0' cellspacing='0' cellpadding='0'><tr>
<td align='center' height='50'><b>阿苯达唑胶囊</b></td>到<td height='30'><font color='#0000FF'><b>【有效期】</b></font></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
所有内容,怎么提取呀!请大侠帮忙呀!
从 <table width='100%' border='0' cellspacing='0' cellpadding='0'><tr>
<td align='center' height='50'><b>阿苯达唑胶囊</b></td>到<td height='30'><font color='#0000FF'><b>【有效期】</b></font></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
所有内容,怎么提取呀!请大侠帮忙呀!
System.out.println(str.replaceAll("<([^<>]+?)>",""));
BufferedReader in=new BufferedReader(new InputStreamReader(url.openStream(),"gb2312"));这样的方法来实现
String line = null;
while((line=in.readLine())!=null){
b.append(line+"\r\n");
}
String rtn = b.toString().replaceAll("<.*?>","");
我想输出一个网页中的所有url地址,如何实现呢,我都找了两天了!