]*href=(\"??)([^\" >]*?)\\1(^>]*>(.*)\/a>"; preg_match_all("/$regexp/siU", $input, $matches); print_r ($matches); } get_links($to_crawl); ?>