SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay I'm working on this parsing script and for some reason it kept freezing up.

    So I did some testing and it is freezing up when it reaches parenthesis in the text.

    The line it hangs on is this:

    Code:
    	while(eregi("QUOTATION:</FONT></TD><TD VALIGN=\"top\">[^=]*", $line, $match)){
    And that line works fine as long as there aren't any parenthesis in the red section.

    So. How do I fix this?
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  2. #2
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it also happens with []'s
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  3. #3
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    (, ), [, ] are all reserved words in regualr expressions and you will need to escape them in order to use them in a regex so add a \ before each one.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


Bookmarks

Posting Permissions

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