Shown below is a simple function, which was run in the middle of a text file that contained multiple instances of repeated blank lines. The output of the function is also shown below.
The only difference between my-search-string-1 and my-search-string-2 is the use of ..\n.. in the first string and ..\\n.. in the second. Since a tab character has to be escaped via ..\\t.., why doesn't the newline character have to be escaped via ..\\n..?
(defun my-find-consecutive-blank-lines ()
"re-search-forward two or more consecutive blank lines."
(interactive)
(setq my-search-string-1 "\\(^\\(\\t\\| \\)*\n\\)\\{2,\\}")
(setq my-search-string-2 "\\(^\\(\\t\\| \\)*\\n\\)\\{2,\\}")
(if (re-search-forward my-search-string-1 nil t)
(print "my-search-string-1 Found")
;;else
(print "my-search-string-1 Not Found"))
(if (re-search-forward my-search-string-2 nil t)
(print "my-search-string-2 Found")
;;else
(print "my-search-string-2 Not Found"))
(makunbound 'my-search-string-1)
(makunbound 'my-search-string-2))
"my-search-string-1 Found"
"my-search-string-2 Not Found"