Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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
Community showcase
Published in Bamboo

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

58 views 0 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you