A maximum character limit on the preg functions?

Posted by animuson on Stack Overflow See other posts from Stack Overflow or by animuson
Published on 2010-05-25T06:11:23Z Indexed on 2010/05/25 7:21 UTC
Read the original article Hit count: 271

On my site I use output buffering to grab all the output and then run it through a process function before sending it out to the browser (I don't replace anything, just break it into more manageable pieces). In this particular case, there is a massive amount of output because it is listing out a label for every country in the database (around 240 countries). The problem is that in full, my preg_match functions seems to get skipped over, it does absolutely nothing and returns no matches. However, if I remove parts of the labels (no particular part, just random pieces to reduce characters) then the preg_match functions works again. It doesn't seem to matter what I remove from the label, it just seems to be that as long as I remove so many characters. Is there some sort of cap on what the preg functions can handle or will it time out if there is too much data to be scanned over?

© Stack Overflow or respective owner

Related posts about php

Related posts about pattern-matching