Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Instructions

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).
Image Modified
Regex for the © ABCD - All rights reserved. line is:

Code Block
themeMidnight
[© ABCD\s\-\sAll rights reserved\.]

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

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

Here is the resulting Confluence page.

Image Modified

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