Both @thambisetty and @renjith_nair have made good suggestions (although @thambisetty does need a minor tweak to account for more than 9 students (use "s/student\d+\: and so on) and @renjith_nair could use @thambisetty 's technique for capturing the initial part of the expected output, and both are missing the space after the ":" - these are minor details). However, both are based on the not unreasonable assumption that Field2 contains all and only the names in the required order and @thambisetty also assumes, again not unreasonably, that your events really do have students listed as student1, student2 etc. and not some student id. Please confirm that this is true and, if so, accept a solution.
... View more