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
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,
2 matches
Mail list logo