0
我正在嘗試編寫一個PHP函數,它將掃描標記的$ content並返回SRC url。正則表達式獲取嵌入SRC
我已經試過:
<embed.+?src="(.+?)".+?<\/embed>
,但我得到:
警告:preg_match_all() [function.preg-全匹配]:沒有結束 匹配的分隔符 '>'發現
我正在嘗試編寫一個PHP函數,它將掃描標記的$ content並返回SRC url。正則表達式獲取嵌入SRC
我已經試過:
<embed.+?src="(.+?)".+?<\/embed>
,但我得到:
警告:preg_match_all() [function.preg-全匹配]:沒有結束 匹配的分隔符 '>'發現
的preg_match或preg_match_all需要一個分隔符
嘗試:/<embed.+?src="(.+?)".+?<\/embed>/
謝謝!這就是訣竅! – HWD 2011-03-15 20:36:38
強制性:http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 – 2011-03-15 20:26:38