Code listing gsub for loop article.append(addInsetCodeListing(["for (i=2; i<=3; i++ ) {", " gsub(\"^\\"|\\"$\", \"\", $i);", " gsub(\"\\"\\", \"\\"\", $i);", "}"])) Code listing while loop article.append(addInsetCodeListing([" while ( $NF ~ /^".*["]$/ ) {", " getline x;", " $0 = $0 "\n" x;", "}"]))