Problem with eregi match

Discussion in 'PHP' started by Catzwolf, Dec 15, 2007.

  1. #1
    I am having a problem with eregi match with the following bit of code, by rights it should work and I guess i must be missing something here. Any help would be welcomed.

    
    $cpfile = '<!-- basic shop coupon goes here (max width 600px)-->text<!-- End Body Table -->';
    $string = '<!-- basic shop coupon goes here (max width 600px)-->(.*)<!-- End Body Table -->';
    $items = eregi( $string, $cpfile, $cparray );
    
    PHP:
    Thanks
     
    Catzwolf, Dec 15, 2007 IP
  2. sunnyverma1984

    sunnyverma1984 Well-Known Member

    Messages:
    342
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    120
    #2
    i found the problem it is with () use \(\)
    ex:
    $string = '<!-- basic shop coupon goes here \(max width 600px\)-->(.*)<!-- End Body Table -->';
     
    sunnyverma1984, Dec 15, 2007 IP