'Artifactory Exclude Pattern for specific non-word character

Background

We're using Artifactory as a repository for Helm Charts among other things. For our specific Helm repo I would like to prevent any packages being uploaded with an underscore in the filename, as that causes issues further down the line. It's possible more characters will have to be excluded later, but I'm focusing on _ for now as that is what currently causes issues for us.

What I've tried

Artifactory offers an Exclude Pattern option to exclude files which contain a certain pattern. I have tried entering many variations of *_* as an Exclude Pattern in order to exclude all files containing an underscore anywhere in the filename. Unfortunately, this doesn't seem to work, since the test files I upload with an underscore still upload fine and are still shown in the repository. When, however, I enter *t* as an Exclude Pattern, all files with a t in the name disappear. This tells me the Excluding in itself works fine, just not with the underscore.

The Question

Is there any way to use the Exclude Pattern (or any other option in Artifactory) to prevent files from being uploaded with an underscore in the name?



Solution 1:[1]

**/*_* works. I'm not entirely sure why that works when *_* doesn't, but it does.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tijmen