www.webdeveloper.com
Results 1 to 4 of 4

Thread: preg_match bug?

  1. #1
    Join Date
    Mar 2012
    Posts
    10

    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
    Location
    Ankh-Morpork
    Posts
    18,922
    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

    eBookworm.us

  3. #3
    Join Date
    Mar 2012
    Location
    Kumta, Karnataka
    Posts
    3
    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
    Location
    Wisconsin
    Posts
    2,120
    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



Recent Articles