/
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
This article explains how to preserve leading or trailing whitespaces through findReplaceRegex using the Confluence Command Line Interface (CLI) app.
Instructions
Any element for which leading or trailing whitespaces must be preserved, must be kept within single quotes (').
As an example, let's use the modifyPage action with the findReplaceRegex parameter to modify a page title.
--action modifyPage --space "SPACEKEY" --title "Pagetitle" --findReplaceRegex "(Demospace):'\$1 and Bobswift '"
The parameter, if used with the single quote, looks like:
The parameter, if used without the single quote, looks like:
Related content
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
Read with this
--findReplaceRegex
--findReplaceRegex
Read with 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
Read with this
Find list of pages containing special characters using Confluence Command Line Interface (CLI)
Find list of pages containing special characters using Confluence Command Line Interface (CLI)
Read with this
matchReplace
matchReplace
More like this
matchReplace
matchReplace
More like this