Data 23. LoremA) heB) haC) huc2. Ipsun yes right to write something here?A) OkB) No C) yesb292. IpsunA) ApexB) hellob289. HeA) huB) HaC) HeThe right answer is:1) Ab2) Abc3) Ac2where the replacement should return to meet Quizlet.com's syntax requirements23. Lorem A) he B) ha C) huc    2. Ipsun yes right to write something here? A) Ok B) No C) yes b292. Ipsun A) Apex B) hellob289. He A) hu B) Ha C) He The right answer is: 1) Ab 2) Abc 3) Ac2This removes all empty spaces, s/\n//g in Vim. How can you remove all \n but not \n\n in Perl or Vim?I think there is a need for Look-ahead because you cannot replace before you know that there is no second \n. 
To remove \n but not \n\n
regular expression;perl
New GNU sed (with parameter -z) do it one pass:sed -z 's/\n\(\n\|[A-Z0-9][)a-z]\)/ \1/g' DATA