Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. $str="hello @jake and @@tim_24 and @@mike and @frank1 and @@ali_gi and @tom";
  2.  
  3. preg_match_all('~@([^s]+)~', $str, $array);
  4. print_r($array[0]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement