我有這樣的正則表達式:PHP RegExpr錯誤未知的修飾詞「(」
([http://some.url.com/index.php?showtopic=\"]*)([0-9]+(?:\.[0-9]*)?)
其從論壇中提取主題鏈接
現在,當我使用它在我的劇本
$url = "([http://some.url.com/index.php?showtopic=\"]*)([0-9]+(?:\.[0-9]*)?)";
preg_match_all spits:「未知修飾符」(''
這也是對preg_match的調用
preg_match_all($url, $str, $matches,PREG_OFFSET_CAPTURE,3);
誰能幫我解決這個明顯的愚蠢問題
這是一個奇怪的正則表達式。它會匹配「nice.rum.is.nice.1234」,就像匹配該網址一樣容易。你確定你想要使用角色類嗎? – 2010-05-22 15:07:08