Re: [PHP] preg_replace on digit word boundry in 2 lines how about 1?

2002-03-19 Thread Mahmoud
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

Re: [PHP] preg_replace on digit word boundry in 2 lines how about 1?

2002-03-18 Thread Joe Rice
i can do this if i do it in two line..i'm wondering if it can be done in 1 line. the two lines: $replace = preg_replace(/(\d)(\D)/,\\1,\\2,$digiword); $replace = preg_replace(/(\D)(\d)/,\\1,\\2,$replace); tia, joe Joe Rice([EMAIL PROTECTED])@Mon, Mar 18, 2002 at 12:39:17PM -0600: hi,