You mean you would like to get rid of anything except absolute or relative URL's ? I have modified your regular expression a little bit:
Now it returns absolute URL's which start with "http" or relative URL's which start with "/" or "." (e.g. "/example.php" or "../example.php" ).
$original_file = file_get_contents("http://www.domain.com");
$stripped_file = strip_tags($original_file, "<a>");
preg_match_all("/<a(?:[^>]*)href=([\"']?)(?=http|\/|\.)([^\"' >]*?)\\1(?:[^>]*)>(?:[^<]*)<\/a>/is", $stripped_file, $matches);
echo '<pre>' . print_r($matches,true) . '</pre>';
Please run it and look at the result.
Also I would suggest to change domain.com to some other URL for tests... I hope domain.com which you have initially used for the test does not mind free advertising... But still they could be possibly unhappy if we experiment too much... Also the reason to use another domain could be to check different HTML and different situations for testing. E.g. all URL's at domain.com are surrounded with double quotes. This could be different if you run your script on some other site. I would even suggest to create a special page with very bad HTML for testing...