Page 1 of 1

Extract all href and src attributes

Posted: Tue May 01, 2007 10:51 pm
by alex.barylski
I need a thourough regex which extracts all href="" and src="" attributes and returns the values.

I plan on checking the status of each as a way of easily informing me of dead links, missing images, etc...

I figure this could be done in regex easily and has likely already been done (countless times) so if you know of a resource/snippet example which does this, please lemme know. :)

I will manually check protocols to javascript: or other so regex can ignore that. ;)

Cheers :)

Posted: Tue May 01, 2007 10:56 pm
by feyd

Posted: Wed May 02, 2007 2:21 am
by alex.barylski
Nice. :)

I'll have to take a better look tomorrow, me tired. :)

Thanks dude :)