You are here: preg_match(): Compilation failed: regular expression too large « PHP Programming Language « IT news, forums, messages
preg_match(): Compilation failed: regular expression too large

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация