Results 1 to 4 of 4

Thread: preg_match bug?

  1. #1
    Join Date
    Mar 2012

    Question preg_match bug?

    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?

  2. #2
    Join Date
    Aug 2004
    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?
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  3. #3
    Join Date
    Mar 2012
    Kumta, Karnataka
    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?

  4. #4
    Join Date
    Jan 2007
    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 ...
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center