<?php $str = 'KX02AB1234'; $str = preg_replace('/(?<=[a-z])(?=\d)|(?<=\d)(?=[a-z])/i', '-', $str); echo $str;
You have javascript disabled. You will not be able to edit any code.