Extract all href and src attributes
Posted: Tue May 01, 2007 10:51 pm
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
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