鑑於以下文字:正則表達式來檢索之間的一切「|描述=」和「|類別」
|Description=This is the start of the ...
... <strong>description</strong> of a product that can span over multiple lines
|Category=Product
如何取回之間文|說明=和|分類=產品?
在上面的例子中,返回的字符串應該只包含:
This is the start of the ...
... <strong>description</strong> of a product that can span over multiple lines
謝謝,這是工作。出於興趣,爲什麼會preg_match('/(?<= \ | Description =)(。*)(?= \ | Category)/ sm',$ text,$ matches))返回一個包含兩個重複返回字符串的數組? – 2012-02-03 08:50:58
@MichaelP:對不起,我不知道爲什麼可能是:( – 2012-02-03 09:30:35