- var_dump: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$string = "google.at;davetrudes.com
asdf
http://www.youtube.com/user/davetrudes
http://code.google.com/u/dave.trudes/";
$match = null;
preg_match_all('/\b((https?|ftp|file)://|(www|ftp)\.)[-A-Z0-9+&@#/%?=~_|$!:,.;]*[A-Z0-9+&@#/%=~_|$]', $string, $match);
var_dump($match);