This article explains how to remove a specific word(s) on the page through Regex using the regex parameter of Confluence CLI.
Instructions
Use the modifyPage action pace and title parameters action with the sspace and title parameters to modify the page. Here are the details:
Sample confluence page with © copyright symbol followed by word(s).
Regex for
...
Code Block | ||
---|---|---|
| ||
© ABCD - All rights reserved. |
Is
the © ABCD - All rights reserved. line is:
Code Block | ||
---|---|---|
| ||
[© ABCD\s\-\sAll rights reserved\.]
|
Ensure that the CLI client file is updated with the required information. Run the below CLI action:
Code Block | ||
---|---|---|
| ||
--action modifyPage --space "ZCLI" --title "CLI Page" --findReplaceRegex "© ABCD\s\-\sAll rights reserved\.:" |
...
Here is the
...
resulting Confluence page.
...
Info |
---|
It is recommended to run the action in a test environment before environment before running in production. |