3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str="My name's #jeff,what is thy name?"; preg_match("/#\w+/", $str, $matches); echo $matches[0] ?>

preferences:
50.84 ms | 402 KiB | 5 Q