3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Hello @1a1a-1a1a and @2B2B2-B2 too'; preg_match_all("/(?<=@)[\w-]+/", $string, $matches); print_r($matches[0]);

preferences:
37.47 ms | 405 KiB | 5 Q