Regex to display all page names containing a word


I would appreciate your help with a Regex for a Bob Swift Attachments Table macro. 

I am trying to display the attachments on all pages that contain the word, for example "help" in the title.


1 answer

Hi Debra, 

The Attachment Table macro contains a number of parms for different regex values as you probably noticed in the macro editor. 

The parameter you want to look at for the attachment name is "Attachment name regex" and you want to specify a value of ".*help.*" without the double quotes to find all attachments with "help" in the name.  The dot matches any single character and the * says to match on 0 or more instances.  So .*help.* will match any number of characters before help and any number after help so your attachment name may begin with help, end in help, or have help in the middle some place.  

Depending on which spaces and pages you want to search across in your instance you can use the other regex parms as well in combination with the attachment name to widen the search out past the current page. 

Some parms, such as "Space key or space name regex", have a special value you can pass.  @all searches all spaces and @self searches the current space the page is in.  

Here is a little more help on the regex: 

How to use regular expressions

I hope this helps.



Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

60 views 3 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you