PHP preg_replace BLANK PAGE (Too many results)...
Posted on 2012-09-02
Hi, I use preg_replace, but when there are to many results, it works really randomly. Sometimes it displays data, sometimes it doesn't.
$tableBody = preg_replace("#^.*<tbody>(.*?)</tbody>.*$#is", "$1", $htm);
When there are 2000 results - $tableBody = nothing even with:
Sometimes it works with the same amount (2000 matches, each match consists of 9 lines), but sometimes it doesn't... how to fix this?