3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $q = '#socialmedia within:15mi'; $result = preg_replace("/ within:\d+\w{2}/", "$1", $q, -1, $count); print_r($result); ?>
based on 1YcCr
Output for 5.4.0 - 7.2.0
#socialmedia