<?php $string = '12jan'; var_export( preg_split( '~(\d+)~', $string, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE ) ); echo "\n---\n"; var_export( preg_split( '~(?:\d+|\D+)\K~', $string, 0, PREG_SPLIT_NO_EMPTY ) );
You have javascript disabled. You will not be able to edit any code.