Page 1 of 1

Capture contents of a hrefs

Posted: Thu Jun 09, 2005 1:37 pm
by Roja
I have a string that contains an entire webpage.

I need a regex that will return only items that start with: <a

and will end with: /a>

(it does need to include any title text, so the above requirements are literal)

Any help is deeply appreciated, as all my attempts have failed miserably.

Posted: Thu Jun 09, 2005 1:43 pm
by Burrito

Code: Select all

$pattern = "#(<a.*?/a>)#";