Results 1 to 5 of 5

Thread: [RESOLVED] Help with preg_match regex

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2012
    Posts
    67

    Resolved [RESOLVED] Help with preg_match regex

    Code:
    $regex = '#[0-9]{1,9}(?=">' . $name . '</a>)#';
    preg_match($regex, $html, $matches);
    echo $matches[0];
    The variable $name is in my test case:
    Code:
    house
    And the $html contains this string:
    Code:
    <a href="addonentry.php?fsid=54334">house</a>
    My goal is to get the id you can see there, but it just won't work.
    lol I am used to C#, the regex there makes sense compared to this :P
    Last edited by toxicious; Apr 17th, 2012 at 02:21 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width