3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Tweet #....................sachintendulkar'; preg_match("/#(\\w+)/", $string, $matches); $hash = $matches[1]; var_dump( $hash); // Outputs 'hashtag'

preferences:
41.48 ms | 402 KiB | 5 Q