NOTEPAD++ REGEX – I can’t replace what I find with nothing


Here is my regex statement which works great and highlights what I'm looking for in notepad++


But when I try to replace it with nothing aka an empty line or a space nothing happens and it just skips to the next find.

I even tried replacing what it found with like '123' or something and that doesn't work either.

To make sure notepad++ is working properly I just did some simple regex replaces and those worked fine.

Best Answer

Are you sure? Try selecting everything in the text and check In selection then do the 'Replace All'.

I suspect that your cursor was at the end of the file when you clicked 'Replace All' and the option was "Direction: Down". I do that myself sometimes without realising it only later!

Related Question