How to remove specific word(s) on a page using the Confluence CLI findReplaceRegex parameter
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.
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).
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.
Related content
How to use findReplaceRegex to preserve whitespaces of a replacement string using Confluence CLI
How to use findReplaceRegex to preserve whitespaces of a replacement string using Confluence CLI
More like this
Use regex to remove Include macro from space(s) using Confluence CLI
Use regex to remove Include macro from space(s) using Confluence CLI
More like this
Anonymize content in a Confluence page with regex using Confluence CLI
Anonymize content in a Confluence page with regex using Confluence CLI
More like this
How to find Confluence pages where the page title does not have "-" or "#" special characters
How to find Confluence pages where the page title does not have "-" or "#" special characters
More like this
How to copy a hierarchy of pages to another space and replace text using Confluence CLI
How to copy a hierarchy of pages to another space and replace text using Confluence CLI
More like this
How to use findReplace parameter to replace content in all pages of a space
How to use findReplace parameter to replace content in all pages of a space
More like this