Version: 2.5.1 (using KDE Devel) Installed from: Compiled sources OS: Linux ^$\n in replace (reg. exp.) does not work. Impossible to replace empty lines. Deleting empty lines or lines like <p></p> is impossible ^any text$\n in search and nothing in replace does not work. Have to take emacs for replacing with reg-expr. because substitution of text in brackets, inserting newlines etc. doesn't work either (already in bug-report)
INVALID The regexp '^$\n' makes no sense, it tries to match a newline _after_ the end of the line ($). The regexp for an empty line is simply '^$'. (note: kregexpeditor rightfully complains when you try entering '^$\n': Your regular expression is invalid, due to something following a 'line end') Cheers.
In reply to comment #1: I doubt this is true in all cases: When replacing "^$\n" with "XXX" in the three-line text "one\n\nthree" with EmEditor I get out "one\nXXXthree". This is what I expected since afaik "$" does not eat the newline. But since Kate doesn't support multi-line Regex yet, anything containing "\n" will not do what you want.
Kate does not support finding text that spans more than one line. We have a GSOC project for it, and some students might start work on it even outside GSOC. This bug is a dub, there are dozens of reports of this problem, even though the situation is clearly stated in the docs and several places on internet.
*** This bug has been marked as a duplicate of 64910 ***