Skip to content

preg_match limit

by admin on Dezember 8th, 2009

One thing to note when working with larger texts and preg_replace() is that the matched text cannot be longer than (usually) 100 000.
I discovered this while debugging a CMS-system which wouldn’t display a certain text. Took forever to find the problem.

Thankfully the default values can be changed – but only if you have access to the server.

http://us.php.net/manual/en/pcre.configuration.php

From → Programming

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS