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: Tuesday, March 06, 2001 12:08 PM
| To: [EMAIL PROTECTED]
| Subject: [PHP] removing and item out of a string
|
|
| Hello all,
|
| 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");
| This is inside a csv file.
|
|
|
| Brian C. Doyle
| Coach Team Force
| Earthlink Technical Support
| [EMAIL PROTECTED]
|


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to