It's all plain text, so just use a normal search-and-replace.
If org-mode
manages to suppress that somehow, just temporarily change the major mode. e.g. M-x fundamental-mode
Edit:
Actually, assuming you're on Emacs 24.1+, occur-edit-mode
will be a nice way to do that, as you'll see the plain text link syntax in the occur buffer, and only the lines you're interested in.
- M-so
<regexp>
RET (for whatever pattern matches the links you want to edit)
- Switch to the
*Occur*
buffer.
- e (enter
occur-edit-mode
)
- Do any editing you need to do. Search and replace, etc. (n.b. You'll need to move point down off the first line of the occur buffer.)
- C-cC-c (confirm the changes and exit
occur-edit-mode
)
- Return to and save the original buffer.
Edit 2:
If you aren't picky about which links you're searching for, you could run a command like this:
(defun my-org-links-occur ()
"Run `occur' for all `org-mode' links in the current buffer."
(interactive)
(occur org-any-link-re))