How to implement regex pattern for attachments that exclude either of two labels using Advanced Tables for Confluence

This article explains how to retrieve the regex pattern for attachments that exclude either of two labels using the app, Advanced Tables for Confluence.

Instructions

The below article shows how to implement the attachment macro and exclude attachments with labels, draft or published.

  1. Log into your Confluence instance, and create a new page or go to an an existing page.
               a. You can click on +sign and click on "Files and images", select "Attached to the page" and click on Upload. once the files are updated, click on Ok.


  2. Add a few attachments with labels to the page. For example, add attachments to the same Attachment Table macro page as follows:

  3. Insert the Advanced Tables - Attachment Table macro and click on Edit.

  4. Navigate to Attachment settings > Page filtering and provide the details as shown:

  5. Navigate to Attachment settings > Attachment filtering and provide the below regex by setting the Label match option to all:
  6. Navigate to Attachment settings > Data settings and set the Columns to display to @all as shown:

  7.  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.