• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Regular Expression - Parse CSV

Guest
Aug 24, 2006 Aug 24, 2006

Copy link to clipboard

Copied

"Q-Accept, Other Employment"
I need to remove the "," from the above string. The CSV File I have includes commas inside quotetaion marks, I need to remove the comma and leave the string intact. Any help with te rereplace format would help

Thanks

Andy
TOPICS
Advanced techniques

Views

170

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 26, 2006 Aug 26, 2006

Copy link to clipboard

Copied

Try this: <cfset string = "Q-Accept, Other Employment" />
<cfset modifiedString = ReReplace(string, '["]', '', 'ALL') />

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 30, 2006 Aug 30, 2006

Copy link to clipboard

Copied

LATEST

I think the previous poster may have a typo in the example code.

Try changing this...
<cfset modifiedString = ReReplace(string, '["]', '', 'ALL') />
to this...
<cfset modifiedString = ReReplace(string, ',', '', 'ALL') />

Good luck!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation