The command
:g/apples/y A
will yank all lines containing the word apples into the a register, which can be pasted with "ap. Any regular expression can be used.
Note the space before the A, and the capitalization of the register letter. If a capital letter is used as the yank register, matc...