Skip to end of banner
Go to start of banner

How to remove a specific word(s) on a page through Regex using Confluence CLI

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

This article explains how to remove a specific word(s) on the page through Regex using Confluence CLI.


Instructions

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


  1. Sample confluence page with © word(s).

    Regex for this line.

    © ABCD - All rights reserved.

    Is

    [© ABCD\s\-\sAll rights reserved\.]
    
  2. Ensure that the CLI client file (acli.properties) is updated with the required information. Execute the CLI action:

    --action modifyPage --space "ZCLI" --title "CLI Page" --findReplaceRegex "© ABCD\s\-\sAll rights reserved\.:"
    
  3. Here is the final Confluence page. 


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