repository include/exlude files regex expression in repository demo for sub directory

preeti singh May 24, 2019

repository include/exlude files regex expression in repository demo have 3 directory and each directory multiple sub directory , .*/dir/subdir/test/.*  .

please suggest correct regex to get files or folders.

1 answer

0 votes
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 28, 2019

Hello @preeti singh

Could you share some examples of which files you wanted to match and which ones you don't want?

I need that to really understand the scenario there so I can help you to build the REGEX for it.

 

I have a couple of examples to share:

.*/filename
  • This one will match any file called "filename" in any repository folder that is NOT root. It needs to have a folder under it <DIR>/filename
.*/folder1/folder2/folder3/.*
  • This one will match any file inside folder3 or subfolders, but only if folder3 is inside a structure like <DIR>/folder1/folder2/
.*/(folder1|folder2)/.*
  • This is like .*/folder1/.* and .*/folder2/.* matches together. Anything inside the folders <DIR>/folder1 or <DIR>/folder2 will match the criteria.

 

I hope that helps to clarify the REGEX expression a little bit.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events