Investigate the concept of a 'text qualifier' in the CSV
format. It is
a charter(s) that tell the system reading the file, anything
between
this and the next instance of this character is text so
ignore any
comma's or other data that looks like a field separation
character. The
common character is a single quote (') but if your data
contains single
quotes as data, then another character would be used.
Your data could then look something like.
1,432,'I am some "string" data',99
OR
1,432,"I'm some string data',99
OR
1,432,|I'm some "string" data|,99
Excel has not trouble opening a file with a defined text
qualifying
character.
If you insist on replacing the characters in your data and
want to do it
in one pass then you are looking at regular expressions.
<cfset lead_fn = rereplace(lead_fn,'[",]','','all')>
Note my used of mixed single and double quotes to avoid the
necessity of
double escaping the quote character to be searched for.