You could use substitute() on the contents of the register to make a replacement, and use a :let command to assign it back to the clipboard register.
For example, start by copying it to the default register in step 4, with y (instead of "+y.)
And then use the :let command to apply a substitute() on the contents of the default register and assign that to ...
I wanted a way to easily toggle a single terminal that would keep the same size and content.
My solution lies in two functions: the main one controls whether a terminal should be opened, the second opens a terminal split where we want on the screen.
If one or more terminal splits exist, they are hidden. Else, a terminal split is opened, either a new one or ...
This question is a couple of years old now but I found it when I was looking for a way to open a terminal inside vim below a bunch of vertical splits. What I want looks something like this:
¦ ¦ ¦ ¦
¦ f1 ¦ f2 ¦ f3 ¦
¦ terminal ¦
What you get with :below terminal or with :set splitbelow and then :...