12-09-2007, 04:17 PM
|
#7 (permalink)
|
|
The Contributor
Join Date: Dec 2007
Location: Belgium
Posts: 60
Thanks: 6
|
Quote:
Originally Posted by Wildhoney
php Code:
preg_match('/(<!-- Begin cached content .* content "main" -->)/iUs', $szContents, $aMatches);
You can then find it in $aMatches[1].
|
Small tip. You can speed up the regex by removing the capturing parentheses. You don't need them because the full pattern match is already included in $aMatches[0].
|
|
|
|