www.webdeveloper.com
Results 1 to 2 of 2

Thread: [RESOLVED] again an preg_match question

  1. #1
    Join Date
    Jan 2005
    Posts
    592

    resolved [RESOLVED] again an preg_match question

    I know we had questions like this 1000s of times but I hope someone can help me to figure this one out.

    i found this code
    PHP Code:
    preg_match_all(
                
    "/<A[ \r\n\t]{1}[^>]*HREF[^=]*=[ '\"\n\r\t]*([^ \"'>\r\n\t#]+)[ \"'>\r\n\t#>][^>]*>/isU",
                
    $html,
                
    $matches); 
    This will basically extract all the links from a html page. The problem is that it returns the entire a tag but I wish to have only the actual link within the href attribute

    can someone help me with this?

  2. #2
    Join Date
    Jan 2005
    Posts
    592
    I am stupid. just ignore the above post. it is working

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles