I have this text:
$string = \"this is my friend\'s website http://example.com I think it is coll\";
How can I extract the link into another
preg_match_all ("/a[\s]+[^>]*?href[\s]?=[\s\"\']+". "(.*?)[\"\']+.*?>"."([^<]+|.*?)?<\/a>/", $var, &$matches); $matches = $matches[1]; $list = array(); foreach($matches as $var) { print($var.""); }