作者woominin (沒事就好)
看板RegExp
標題[問題] 抓取html table 裡面的中文
時間Sat Oct 4 14:25:09 2014
使用:php
想請問一下,我透過parse得到n個 html
而這n個html 裡,我要的資訊都是像下面這樣放在 table 的td裡
<td width="768" align="center" background="images/index1_11.jpg"
style="color: #000; line-height: 20px; font-size: 13px;">
<span class="style1">T:0912-198577、LINE ID:0912198577、
E:
[email protected]、台東市連航路150號</span></td>
但是這個 class 的名稱不盡相同 有許多種
我要怎麼一次去抓取這n個網址裡 所有我要的聯絡資訊呢 ??
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.198.188.68
※ 文章網址: http://webptt.com/m.aspx?n=bbs/RegExp/M.1412403911.A.518.html
1F:→ jenesis: 這種東西在前端用jquery之類的selector找會比較適合吧? 10/06 22:07
2F:→ jenesis: 硬是要用regex的話可能會比較麻煩 10/06 22:07