3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $subject = 'ямайка и так далее'; $result = preg_replace('/(\s)?ямайка(?(1)|\s?)/x', '', $subject); echo $result;
based on MgUja
Output for 4.3.0 - 7.1.0
и так далее