You can use this script to replace the specified text on all pages within a space.
I'm a product owner, and the name of my product has been changed following an acquisition.
Using this script, I can replace every use of the old product name with the new product name across
the entire Confluence space in one go.
Good to Know
You must specify your own 'spaceKey', 'oldText', 'newText' variables.