Hi Ray,
when posting formatted code/text you need to indent by at least 4 spaces, then it will keep its layout.
The regular expression is explained, for searching here and for replacing here
What it does is the following: (high level - detailed infos on the mentioned website)
( ) = this is a caturing group
\R = newline chars
{6} = should be repeated exactly 6 times
(.*?\R){6}) = basically means match 6 lines
(.*,.*\R) = match lines which have or not chars followed by a comma and again have chars or not followed by newline
(now I’m thinking .+,.+\R would be better because this means lines having atleast one char followed by comma and again at least one char followed by newline)
(.*,.*\R)* = the added * means it could be any number of lines or no line at all
" at the end basically means, last line needs to be the double quote
In replace, as we only use what was matched in \3, anything else get deleted.
As said, the links provide better and detailed explanation.
Cheers
Claudia