Andy, > What you can do is to use STRING(REGEX REPLACE to replace ";" with let > say "--SC--" and then you replace '\n' with ';', then your FOREACH will > work. # replace ; chars so that we can fetch them later STRING(REGEX REPLACE ";" "@&@" CONTENTS1 "${CONTENTS1}") is what I'm using! JB