I need to find all occurrences of AAsomeArbitraryStringBB
and replace it with CCsomeArbitraryStringDD
.
So
AAHelloBB
Text
AAByeByeBB
becomes
CCHelloDD
Text
CCByeByeDD.
It's important to note that the replacement string contains part of the search string.
Best Answer
This is basic task for
sed
command:Eventually if you want to do this for all "arbitrary strings":