Custom code in all text between ?

One option would be making these edits in bulk offline, working with a CSV file (in Excel perhaps). The fantastic WP CSV plugin-in is a great tool for this.

Install the plugin, export your pages to edit, import the updated post data. Done.