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

Version 1 Next »


This page demonstrates how to use the Attachment Table macro, which is part of the Advanced Tables for Confluence app, to select attachments based on the Space or attachment name, using a Regex expression.

  • Use the special @self value for the spaceRegex parameter to match on all attachments in the current Space.
  • Use .*png|.*jpg to match on attachments whose name ends in png or jpg.

Macro browser input

Select this macro

Macro NameAdvanced Tables - Attachment table
Macro Syntax{attachment-table}

Define these parameters/values

Attachment Table settings > Page filtering > Source (Regex) > Filter by page name @self
Attachment Table settings > Attachment filtering > Attachment name regex.*png|.*jpg


Wiki markup input (Old editor)


Confluence is more limited on parameter values. In this case, | (pipe - used for regex or) is a reserved character, so it cannot be used.

Example result

Selecting attachments based on matching on more than one label

The above example shows how to match on one label. Constructing a regex to match attachments that have 2 or more specific labels is a bit more complicated.

  1. Set the Label match option to all
  2. Use a regex pattern similar to the following using xxx, yyy, and zzz as example labels:
2 labels:  .*(?:.*\b(?:(?:xxx)|(?:yyy))\b.*){2}.*
3 labels:  .*(?:.*\b(?:(?:xxx)|(?:yyy)|(?:zzz))\b.*){3}.*

Other examples

Visit our full list of product examples for additional inspiration!

  • No labels