Hi, Don't know if it's the best way, but it works:
<?php $digiword = "123joe123"; $replace = preg_replace("/(\d)(\D)/","\\1,\\2",preg_replace("/(\D)(\d)/","\\1,\\2",$dig iword)); print $replace; ?> will print 123,joe,123 Regards, Mahmoud -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php