I\'m trying to parse some web pages with preg_match_all() and some of them are quite large as several MBs in size. And one of the regular expressions matches some text strin
Set the ini_set('pcre.backtrack_limit', '1048576'); to whatever you want in your script or on your php.ini file for global use. (example is 1mb)
ini_set('pcre.backtrack_limit', '1048576');
Credit to: http://www.karlrixon.co.uk/writing/php-regular-expression-fails-silently-on-long-strings/