<?php $reg = '/^([^\-]?)((?!0)[0-9]+)$/smi'; $str = '-20'; echo preg_replace($reg, '', $str);
You have javascript disabled. You will not be able to edit any code.