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