Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Regex to display all page names containing a word

Debra Hicks June 26, 2017

Hi,

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.

Thanks!

1 answer

0 votes
Jeff Pierce _Appfire_ July 6, 2017

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
TAGS
AUG Leaders

Atlassian Community Events