How to remove specific word(s) on a page using the Confluence CLI findReplaceRegex parameter

This article explains how to remove specific word(s) on the page using the regex parameter of Confluence CLI.


Use the modifyPage action with the space and title parameters to modify the page. Here are the details:

Sample confluence page with © copyright symbol followed by word(s).

Regex for the © ABCD - All rights reserved. line is:

[© ABCD\s\-\sAll rights reserved\.]

Ensure that the CLI client file is updated with the required information. Run the below CLI action:

--action modifyPage --space "ZCLI" --title "CLI Page" --findReplaceRegex "© ABCD\s\-\sAll rights reserved\.:"

Here is the resulting Confluence page.

It is recommended to run the action in a test environment before running in production.