This article explains how to retrieve the regex pattern for attachments that exclude either of two labels using the app, Advanced Tables for Confluence.
The below article shows how to implement the attachment macro and exclude attachments with labels, draft or published.
- Log into your Confluence instance, and
- Insert the Advanced Tables - Attachment Table macro and click on Edit.
- Navigate to Attachment settings > Page filtering and provide the details as shown:
- Navigate to Attachment settings > Attachment filtering and provide the below regex by setting the Label match option to all:
- Navigate to Attachment settings > Data settings and set the Columns to display to @all as shown:
- Click on Save settings and Publish the page. Below is the desired output that excludes all attachments with labels, draft or published:
It is strongly recommended to test this in a non-production environment before implementing it in production.