import java.util.regex.*;

class Ideone {
	public static void main (String[] args) throws java.lang.Exception {
		// pattern that captures quoted strings ignoring all escaped quotes
		Pattern p = Pattern.compile("\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"");
		
		String data1 = "\"Test Line wo line break\", \"Test Line \nwith line break\"\n\"Test Line2 wo line break\", \"Test Line2 \nwith line break\"\n";
		
		// functional code to get all quotes strings and then remove all line 
		// breaks from matched substrings
		String repl = p.matcher(data1).replaceAll(m -> m.group().replaceAll("\\R+", ""));
		
		System.out.println(repl);
	}
}