Here is a way to do so, it gives nearly what you want, so you may be able to build your proper solution on that.
tl;dr
set a mark on the line to copy to with ma and run
:g/C/t'a-
decomposition
First of you can use the g command here, it filters lines matching a pattern. Then you can use the t command, which copy a line.
Let say you have the following file (A is just noise):
A
A
To replace
A
A
C 1
A
A
C 2
A
A
You can do
:g/C/t.
This will duplicate the lines matching C, because . reference the current line.
So if you want to duplicate the line at the current position, set a mark and use the command again:
ma
:g/C/t'a
You will have the following result:
A
A
To replace
C 2
C 1
A
A
C 1
A
A
C 2
A
A
Nearly there! You can add a - to the address of the paste to achieve the paste in the correct order:
:g/C/t'a-
Will produce:
A
A
C 1
C 2
To replace
A
A
C 1
A
A
C 2
A
A
Now you can delete the "To replace" line if you want.
Note: you can use the absolute line number instead of a mark if you want, i.e. :g/C/t12.
Regarding the help:
You already know about the :h :g that gives you the information that g takes an Ex command to perform action. So you might want to search for a command that copy.
:copy exists and can be abbreviated by :t. Both take an address to copy to.
:h {address} gives you want you need.
ddma:g/^# /t'a-is the best fit I could do..'a-also gives the lines in same order as occurs in file, which I needed..:h :tconveniently has help on:mas next item, so I now know how to move the filtered lines :) – Sundeep May 13 '16 at 09:38