3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = array( '#tag', 'text #tag text', 'text #tag', 'text#tag', ); $res = preg_grep('/#(\S{1,24}+)/u', $var); print_r($res);
Output for 4.3.0 - 5.6.26, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0RC5
Array ( [0] => #tag [1] => text #tag text [2] => text #tag [3] => text#tag )