Skip to end of banner
Go to start of banner

How to find the Confluence pages where the page title does not have special characters "-" or "#"

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 6 Current »

This article explains how to find the Confluence pages where the page title does not have special characters, "-" or "#" using the Confluence Command Line Interface (CLI).

Instructions

Use the getPageList action to get the list of pages with regex filtering on a page title with parameters, space and regex.

  • Run the CLI action with regex as follows to get the list of pages, whose title does not contain - (hyphen)

    --action getPageList --space "SM" --regex '^((?!-).)*$'

    The output of the CLI action:

    11 pages in list
    AAA
    AAA.*BBB
    Home
    SPACE MK Home
    This is title 0
    example.txt
    page test
    pagemk.png
    test4#test
    testing_childpages
    testpage.jpeg


  • Run the CLI action with regex as follows to get the list of pages, whose title does not contain "-" or "#".

    --action getPageList --space "SM" --regex '^((?!-|#).)*$'

    The output of the CLI action:

    10 pages in list
    AAA
    AAA.*BBB
    Home
    SPACE MK Home
    This is title 0
    example.txt
    page test
    pagemk.png
    testing_childpages
    testpage.jpeg


  • No labels