anyone helping with a regex

Discussion in 'PHP' started by crivion, Aug 25, 2009.

  1. #1
    crivion, Aug 25, 2009 IP
  2. superdav42

    superdav42 Active Member

    Messages:
    125
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #2
    /(Europa League.*?)(\d+)\s-\s(\d+)(.*?Super Cup)/
    Code (markup):
    You could use this regex to find the first scores in $2 and $3 and then to a replace to so that's all is left is $1 and $4. Put it in a loop until there are no more matches.
    If that makes sense.
     
    superdav42, Aug 26, 2009 IP
    crivion likes this.
  3. crivion

    crivion Notable Member

    Messages:
    1,669
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    210
    Digital Goods:
    3
    #3
    for some reasons it give's me all needed scores twice but that's no issue I'll refine it
    thanks a lot, +rep
     
    crivion, Aug 26, 2009 IP