I am doing a Find & Replace in Notepad++. Each of the pieces work correctly, but when I put the entire string together, it is not working.
I have an old HTML document I am editing where the original page cut up the text, thus:
<div>
<h2>Title</h2>
<p>This is a line of[CR][LF]
text that was cut to[CR][LF]
fit on screen.</p>
</div>
I want to find the line breaks that are cutting up the text and eliminate them, but not other line breaks.
My regular expression is:
([A-z0-9]+)[\r\n][ ]{3,}([A-z0-9]+)
It will be replaced with:
$1 $2
I have tried each of the pieces of my regular expression and they all find what I would expect: ([A-z0-9]+)
finds text, [\r\n]
is finding my line breaks, [ ]{3,}
is finding their initial indents, and ([A-z0-9]+)
again finds text.
I have even tried sets of expressions and they all work: ([A-z0-9]+)[\r\n]
is finding text at the end of a line, [\r\n][ ]{3,}
is finding line breaks with the indent at the beginning of the new line, and [ ]{3,}([A-z0-9]+)
is finding initial indents followed by text.
Perhaps I have two questions: 1) Is this a Notepad++ bug, or have I missed something with my regular expression? 2) Any ideas on solving this by some other expression?
If it is a bug, I suppose I can just trial and error until something works. It would probably be well to report the bug, though, so if anyone can verify that, it would help.