I'm using PHP 5.3.0 and I have been experiencing some annoying problems with the preg_match function. It seems there is a hard coded size limit in the function limiting the scope over which the function can make a regexp match to around 50K. Is it just me or does anyone else have the same problem? Is it a limitation that one should be aware of?
No idea, as I've never tried to make a pattern match 1k of text, let alone 50k or more. :eek:
What is the nature of the failure?
Have you searched the PHP bug database yet?
I have used preg_match, I have faced the same problem as you. What was the exact nature of your problem? Can you write down the code that has bug?
preg_match definitely breaks down when dealing with large matches. I'd be interested to know what you're attempting to parse. There are often better options than a regex ...