Re: [PHP] removing and item out of a string

2001-03-06 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Brian C. Doyle") wrote: > I need to remove a comma from inside of 2 quotes ie "1,234.56" I need to > change that to "1234.56" > Unfortunatly I can not do reg_replace(",","","1,234.56"); Possibly because the function is called ereg_replace()

RE: [PHP] removing and item out of a string

2001-03-06 Thread Doug Brewer
what about preg_replace("(\d),(\d)", "$1$2",$your_string); to replace every occurence of a comma surrounded by digits? This works with 4.04, prior to that the "replace" string would by "\\1\\2". Doug | -Original Message- | From: Brian C. Doyle [mailto:[EMAIL PROTECTED]] | Sent: Tuesda

Re: [PHP] removing and item out of a string

2001-03-06 Thread Rick St Jean
I really suck with Regular expression but what if you did a replacement on 1, and replaced it with 1 2, and replaced it with 2 3, and replaced it with 3 Kind of a cheap workaround. ?? Rick At 01:07 PM 3/6/01 -0500, Brian C. Doyle wrote: >Hello all, > >I need to remove a comma from inside of 2 q