$re = '/(www\S+)/';
$str = ' 3 How To Pick A Lock 444,048 All it takes is a bobby pin. Check out more awesome BuzzFeedBlue videos! mariners MUSIC On The Lam Licensed via Warner Chappell Production Music Inc. GET MORE BUZZFEED: www.buzzfeed.com www.buzzfeed.com/video www.youtube.com/buzzfeedvideo www.youtube.com/buzzfeedyellow www.youtube.com/buzzfeedblue www.youtube.com/buzzfeedviolet www.youtube.com/buzzfeed BUZZFEED BLUE Tasty short, fun, inspiring, funny, interesting videos from BuzzFeed. From incredible science facts to amazing how-to\'s and DIYs, BuzzFeed Blue will entertain, educate, spark conversation about all the little things that matter in life. Bite-size knowledge for a big world. Just like BuzzFeedVideo, but more blue.';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php