Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: parsing help

  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Location
    Washington
    Posts
    223
    Thanks
    34
    Thanked 0 Times in 0 Posts

    parsing help

    im trying to use this code right here to crawl for some links
    PHP Code:
    /example.com/(.*)/ 
    but the problem is it is leaving out the "/" after .com. lets say the link format for example is example.com/435345/details.html

    the code works fine and will grab that link but it grabs it as example.com435345/details.html
    so what am i missing or doing wrong to make the "/" not be there?
    can anyone help with this? Thanks


    ----------------
    nevermind i fixed it. the proper way was. /example\.com(\/.*)/
    Last edited by cosmicsea; 02-01-2010 at 02:01 AM. Reason: resolved

  • #2
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    I am wondering if the slash needs to be escaped...
    Rowsdower! has accused me of having mental problems, and the administrator allowed it. What a great forum huh?

  • #3
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    Quote Originally Posted by cosmicsea View Post
    the code works fine
    Obviously it doesn't work fine.

    so what am i missing or doing wrong
    Giving us the faintest idea what your code looks like?

  • #4
    Regular Coder
    Join Date
    Jan 2010
    Location
    Washington
    Posts
    223
    Thanks
    34
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by masterofollies View Post
    I am wondering if the slash needs to be escaped...
    for some reason it did not post my format correctly. you can see it is correct on a quote and reply. I do have the slash escaped.
    /example\.com\/(.*)/


  •  

    Posting Permissions

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