How to replace two strings at once with one in Notepad++ using regular expressions?
I need this:
================
================
Replace with this:
--------------
By "two strings", I suppose you mean two lines.
Globally, it can be achieved by seeing the two lines as a single string containing a new line character. So the regular expression (RegEx) pattern should be something like that:
<first line pattern><new line character><second line pattern>
The new line pattern can be either \r\n
or \n
depending of the file, you should test the both.
For your specific case, the match pattern should be the following
=+\r\n=+
=+
means at least one =
sign. +
is greedy, so it will take all =
sign if there are more than one.
\r\n=======
. This moves up a line.