Notepad++ replace question

acidman1

Senior Member
Joined
Oct 19, 2009
Messages
542
Reaction score
4
I am hoping someone can help me. I have this file that we need to process that looks something like this.

&this
is
my
word&
%this
is
my
word%

What we need to do is replace the "my" in the %block with "my123". I have managed to get the regular expression to find the entire code block %(.+?)%, but cannot manage to get just the "my" in that block found to be replaced. Yes the two blocks are identical but just the bottom block needs to be modified.

Any ideas?
 
Find
Code:
^(%.*)^my$(.*%)$
Replace with
Code:
\1my123\2
And ensure ". matches newline" is checked.
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X