3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = ' 55 штю'; $pattern = '/([0-9]+)(\s?шт)/i'; $replacement = '$1 шт'; echo preg_replace($pattern, $replacement, $string);
Output for 7.3.0alpha1
55 штю