[問題] PHP抓原始碼內容

看板PHP作者 (None)時間13年前 (2011/08/04 11:43), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
※ [本文轉錄自 RegExp 看板 #1EEXJODP ] 作者: SABER101 (None) 看板: RegExp 標題: [問題] PHP抓原始碼內容 時間: Thu Aug 4 11:41:09 2011 http://www.epinions.com/review/Canon_PowerShot_SX210_IS_Digital_Camera/content_536777166468 想從上面網址抓中間Review部分 Review是在本文位置 <span class=rkr> 本文 <br> 表達式這樣寫<span class=rkr>\s(.*)\s<br> 完全抓不到東西 然後\s(.*)\s<br>這樣抓到文章九成 剩下這段抓不到 Straight photography (Street, documentary, and environmental portraiture) is primarily concerned with capturing images of people in uncontrived, naturally lit and candid settings that evocatively depict or dramatically reveal some aspect of the human condition. In addition to being a first rate general purpose digicam, the nifty little SX210 is almost perfect for “straight” photography - it is compact, responsive, unobtrusive, features a 14x zoom (for a little extra standoff room) and dependably generates first rate images. 明明就有寫換行為什麼會抓不到在同一行的這一段 然後第一個和第二個的差別只差<span class=rkr> 然後就全沒了????? 好苦惱啊 希望有人能解答 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.137.134.31 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.137.134.31

08/04 11:58, , 1F
我在regexp回了
08/04 11:58, 1F

08/04 12:15, , 2F
要加 /s 才抓得到換行....月經題了 該置底一下
08/04 12:15, 2F
文章代碼(AID): #1EEXLK0f (PHP)