Reading in data with commas

I’m reading in data from Notepad and it’s working good. The problem I’m having now, is that I have data that eggPlant needs to read in as a comma and it’s treating it as a delimiter. Is there a way to escape the comma in the data I’m reading in? This is what I’m having problems with: “certified, standard withholding”.


No, there’s no way to escape the comma. If that item always has a comma, then you can treat, for example, items 5 and 6 as a single item. Just read them both in and put them back together as a single string with a comma in it. If it only sometimes has a comma, then you might want to export the file with a different delimiter, like a tab. The item delimiter can be anything, you just need to tell eggPlant what to look for. Some examples:

set the itemDelimiter to tab
set the itemDelimiter to "%"
repeat with each item delimited by "@" of "this@is@a@string"
	put it
end repeat

Thanks Matt! I’ll try using your first suggestion since I was hoping I wouldn’t have to change the delimiter.