Hello,
Find:
regexp1 **sometext** regexp2
Replace with:
newregexp1 **sometext** newregexp2
Here, I do not want **sometext**
to be modified.
That is to say, if I have the following lines in a file:
Hello somebody! Have a good day.
Hello somebodyelse! Have a good day.
I want the output to be:
Bye somebody! Good night.
Bye somebodyelse! Good night.
My regular expression search would be of the following form:
Hello .*! Have a good day.
How can I use the \1
keyword with sed
(or any linux tool) to accomplish this.
Please help me with the actual command syntax.
Also, if you have a way to do this in notepad++, please let me know.
Thanks for any Help!