I'd like to loop through a list that is comma delimited but I'd like to skip the commas that would appear with in a delimited string. Here's an example: "Fred, Ethel", "Fred, Wilma" I'd like the comma inside the quotes to be viewed as part of a string not as a delimiter. Is there any clean way to do this?
One way is to change the delimiter from a comma to something else, like a pipe symbol "|" <cfset yourString = '"Fred, Ethel", "Fred, Wilma"'> <cfset newString = reReplace(yourString, '"[ ]*,[ ]*"', '"|"', "all")> <cfloop list="#newString#" index="elem" delimiters="|"> <cfoutput>#elem# <br/></cfoutput> </cfloop>