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.
What is the nature of the failure?
Have you searched the PHP bug database yet?
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
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 ...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread