<?php preg_match_all('/(^|\s)(@\w+)/', '@name1 ipsum @ lorem @name3', $result);var_dump($result[1]);
Standard input is empty
array(2) { [0]=> string(0) "" [1]=> string(1) " " }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!