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,
> i'm trying to replace ever digit nondigit boundary with a ","
> in a string. i'm trying to get \d\D to be replaced with \d,\D
> and the reverse \D\d with \D,\d ... i'm not having any luck.
>
> $digiword = "123joe123"
> $replace = preg_replace("/(\d)(\D)/","\\1,\\2",$digiword);
>
> this ends up with $replace being 123,joe456
>
> how can i also catch the joe456 to end up with
>
> 123,joe,456
>
>
> any help would appreciated.
>
> thanks,
> joe
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
How do i get rid of those words in my screen that are coming from you?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php