Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from Jun 2 '13 at 20:10

This question came from our site for professional and enthusiast programmers.

Are you sure? Try selecting everything in the text and check In selection then do the Replace All. – Jerry Jun 2 '13 at 15:48
That fixed it. Why did I need to highlight everything and choose "in selection"? is there something unique about the regex? – Neil Jun 2 '13 at 15:53
I put that in an answer. – Jerry Jun 2 '13 at 15:55

2 Answers 2

up vote 0 down vote accepted

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!

share|improve this answer
you wouldn't happen to know how I can replace and remove the whitespace from \s[0-9]+ thd once it's found? – Neil Jun 2 '13 at 16:00
@Neil I left a comment in your new question. I'm not sure I understand your question since [0-9]+ means a number and I would have thought you used {0-9}+. – Jerry Jun 2 '13 at 16:22

You mean simply remove the space preceeding the number(s) (typo "thd"?) ?

Ctrl-H , then search for \s([0-9]+) , replace with \1 . make sure the mode "Regular expressions" are activated.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.