in reply to Selective replace based on user input
Given that it's interactive, why not just use an editor? This task would be pretty trivial in an editor like vim.