In order to split my string at the point which is preceded by digit and is followed by letters as:
$str = '12jan';
I have used
$arr = preg_split('/(?<=[0-9])(?=[a-z]+)/i',$str);
It works file and gives the desired output. I want to update it so that it gives the same output for strings like.
$str='12 jan';
$str='12 jan';
$str='12/jan';
$str='12//jan';
$str='12/jan';
$str='12*/jan';
$str='12*//jan';
The code should work for any strings given above so that at the end of the day I have a array like
Array
(
[0] => 12
[1] => jan
)
Any help will be appreciated.