Something like this may help? Hopefully! http://onaje.com/content/working-regular-expressions-href-url-extractor
Do you mean you want to get all links on a page? http://www.jaygilford.com/php/php-dom-get-all-pagelinks/ or http://www.jaygilford.com/php/common-questions/how-to-get-all-links-from-a-web-page/