Regex Help Plz!!

Discussion in 'PHP' started by lggmaster, Jan 7, 2008.

  1. #1
    Ive been searching for a few hours now, and I cant seem to find anything that helps me.

    Im looking for 2 simple regex scripts for a project im working on.

    The first is a script that searches a webpage for all links on it and will display them.

    The second will be one for the same, except for links, I would be searching for webpage for a specific <div> tag like <div class="title">

    Any help would be most appreciated.
     
    lggmaster, Jan 7, 2008 IP
  2. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #2
    first:
    /http:\/\/[a-z0-9]*\.[a-z]/

    second:
    /<div.*>(.*)<\/div>/
     
    Kaizoku, Jan 7, 2008 IP
  3. Freewebspace

    Freewebspace Notable Member

    Messages:
    6,213
    Likes Received:
    370
    Best Answers:
    0
    Trophy Points:
    275
    #3
    for the first one search this forum througout you may get the answer or again post here I will search for the code and post it here
     
    Freewebspace, Jan 7, 2008 IP
  4. lggmaster

    lggmaster Peon

    Messages:
    233
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ive searched this forum, looked into everything with regex, and nothing really hits me for what im looking for. i found a few on the net that would suit the url extractions, but, i cant get them to work. i have curl enabled, have tried curl scripts, and i have tried normal php fopen/fread type scripts, the problem lies with them all going cold and not working. im really looking for just a basic example that works that i can play with and customize to my needs, i just cant get that far with the scripts that i find.
     
    lggmaster, Jan 7, 2008 IP