I'm trying to automate some simple modifications to a set of files with a script using vim ex mode. What I want to do is search for a pattern, delete it from its current location (just the pattern, not the whole line), and paste it at the end of the document.
There are some useful suggestions at the following URL, but I feel like there ought to be a way of doing this without defining a special function. http://vim.wikia.com/wiki/Copy_the_search_results_into_clipboard
Recommendations?