No need to use regex or code stage to solve this. Use a multi calculation stage with the following expressions (""Data"" is the name of the data item):
Left([Data], InStr([Data], ""."")) and store result in Data - this removes line 3 and 4
Replace([Data], NewLine(), "" "") and store result in Data - the replaces the new line with a space