:g/3/m$
does what you want:
:g[lobal]/foo/command
executescommand
on every line matchingfoo
,:m$
moves the current line to the end of he buffer,:g/3/m$
moves all lines containing a3
to the end of the buffer.
See :help :global
and :help :move
.
Ex commands for the win!
edit
To cut all those lines in the same register, say register a
, use:
:g/3/d A
meaning "cut and append these lines to register a
".
See :help registers
.