Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $str="hello @jake and @@tim_24 and @@mike and @frank1 and @@ali_gi and @tom";
- preg_match_all('~@([^s]+)~', $str, $array);
- print_r($array[0]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement