Press CtrlF (or in normal mode, press
OPEN c_CTRL-F q: q/ q?
There are two ways to open the command-line window:
1. From Command-line mode, use the key specified with the 'cedit' option.
The default is CTRL-F when 'compatible' is not set.
2. From Normal mode, use the "q:", "q/" or "q?" command.
This starts editing an Ex command-line ("q:") or search string ("q/" or
"q?"). Note that this is not possible while recording is in progress (the
"q" stops recording then).
When the window opens it is filled with the command-line history. The last
line contains the command as typed so far. The left column will show a
character that indicates the type of command-line being edited, see
Vim will be in Normal mode when the editor is opened, except when 'insertmode'
Then you can just
yy the required line (the current, or previous line, as the case may be), and paste it in the target window.
Or, better (if you want to copy only the regex) copy by placing the cursor at the beginning of the regex and type
ya', then close the command-line window (Ctrl+C twice) and paste it in the text.