I have been trying to figure out how to convert string below string to multiple lines where it will add comma after two consecutive letters. Anyhelp is appreciated.
$myLine = "1234:21:3AB3459435:2343RT23432523:CD";
$myLine= preg_replace('/((?<=\[a-zA-Z]\b))/', ',', $myLine);
output would be
1234:21:3AB,
3459435:2343RT,
23432523:CD,
THanks, jp
I like all the answers, i appreciate everyone pitching in to help and ran through all the various different ways of getting this to work. it is amazing what regexp php can do one thing so many different ways. thanks to all again!!!!