so i want to find usernames in a string and put them in an array, i've made the regex and it returns the match, but when there are 2 matches it only puts the first one in the array. Can anyone see what is wrong with my regex?
$reactie = 'hey @sjerd and @jeska';
$pattern = '/@\w*/';
preg_match($pattern, $reactie, $matches);
print_r($matches);