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 Space key or space name regex parameter to match on all attachments in the current Spacespace.
- Use .*png|.*jpg to match on attachments whose name ends in PNG or JPG.
Macro browser input
Select this macro
Define these parameters/values
|Space key or space name regex||@self|
|Attachment name regex||.*png|
Confluence is more limited on parameter values. Thus, | (pipe - used for regex or)is a reserved character and cannot be used.
Parameters set in the macro editor
Wiki markup input (Old editor)
The above example shows how to match on one label. Constructing a regex to match attachments that have 2 two or more specific labels is a bit more complicated. To do this, you must:
Visit our full list of product examples for additional inspiration!