How to extract this links

Using mod_rewrite to handle various content issues

How to extract this links

Postby pipix » Wed Jun 20, 2007 5:27 am

Hello, i have url's on page:

<a href=url here><img></a>

without quotes, i need to extract all links. I'm using:

Code: Select all
/a[\s]+[^>]*?href[\s]?=[\s\"\']+".
                    "(.*?)[\"\']+.*?>"."([^<]+|.*?)?<\/a>/


but with no success :( Can anyone help me?

(php, i have other code i need just regexp part)
pipix
 
Posts: 4
Joined: Wed Jun 20, 2007 5:24 am

Postby richardk » Wed Jun 20, 2007 6:46 am

Try
Code: Select all
/a[\s]+[^>]*?href[\s]?=[\s\"\']*".
                    "(.*?)[\"\']*.*?>"."([^<]+|.*?)?<\/a>/
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby pipix » Wed Jun 20, 2007 8:27 am

Thank you :)
pipix
 
Posts: 4
Joined: Wed Jun 20, 2007 5:24 am


Return to Content

Who is online

Users browsing this forum: No registered users and 15 guests

cron