Edit With Regex
To change links in a space, you can use the full flexibility of regular expressions.
You can also add a version message to the changed pages.
Use Case 1
To change the links from a confluence datacenter instance to the confluence cloud link structure you can use the following regex and replace strings:
Regex: (yourconfluencedomain.com)\/display\/([A-Z]+)\/
Replace: yourname.atlassian.net/wiki/spaces/$1/pages/
You can find a cheat sheet on what is possible here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Cheatsheet
To replacement, you can also use special replacement patterns which are listed here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_the_replacement