|
Posted by Clodoaldo Pinto on 10/21/69 11:57
preg_match(): Compilation failed: regular expression too large at
offset 0
The regular expression is 34,745 bytes long.
<?php
$regExp = 'huge regexp with 34,745 bytes';
echo '<pre>strlen($regExp) = ', strlen($regExp), "\n";
echo preg_match($regExp, 'sudokusweb.com');
echo '</pre>';
?>
This error shows in Fedora Core 5 - PHP 5.4.1
The same code works in a shared host running PHP 4.3.11:
http://allthehosts.com/testregex.php
The code including the regexp can be downloaded from:
http://allthehosts.com/testregex.txt
Regards, Clodoaldo Pinto
Navigation:
[Reply to this message]
|