Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / August 2006



Tip: Looking for answers? Try searching our database.

Regular Expression - Parse CSV

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
_andyK - 25 Aug 2006 00:44 GMT
"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
Hal B. Helms - 26 Aug 2006 12:09 GMT
Try this: <cfset string = "Q-Accept, Other Employment" />
<cfset modifiedString = ReReplace(string, '["]', '', 'ALL') />
<newbie /> - 30 Aug 2006 15:59 GMT
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!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.