How do you use a macro to yank all regex matches into a register?
Answer
qaq:g/pattern/normal "Ayy
Explanation
Clear register a with qaq, then use :g/pattern/normal "Ayy to append all matching lines to register a. Collects matches across the file.