我怎樣才能既(http://[^"]+)
的?:匹配 有沒有辦法匹配遞歸/嵌套正則表達式? (PHP,preg_match_all)
<a href="http://yoursite.com/goto/http://aredirectURL.com/extraqueries"></a>
(我知道這是非法URL,但同樣的想法)
我想正則表達式給我這兩比賽:
1 http://yoursite.com/goto/http://aredirectURL.com/extraqueries
2 http://aredirectURL.com/extraqueries
無運行多個preg_match_all的
真的難住了,爲感謝任何光線都可以流下。
任意嵌套,或最多兩個? (前者是不可能的,只有一個PHP正則表達式。) – Ryan 2012-04-19 23:05:15
@minitech [遞歸正則表達式man!](http://stackoverflow.com/a/3180176/31671):P – alex 2012-04-19 23:15:32
@alex:呃...哇。 – Ryan 2012-04-19 23:17:29