<?php $subject = 'ямайка и так далее'; $result = preg_replace('/(\s)?ямайка(?(1)|\s?)/x', '', $subject); echo $result;
You have javascript disabled. You will not be able to edit any code.