I have this code which does exactly what im after. However it only does it for one username, was wondering how I could do it so it gets more than one username from it?
$string = 'Tweet @one two @three four';
preg_match("/@(\\w+)/", $string, $matches);
$hash1 = $matches[1];
echo $hash1;
$hash1 returns "one".