private String replaceBlobName(String name) {
        String newName = name;

        for (var entry : this.regexs) {
            Pattern pattern = entry.getKey();
            Matcher match = pattern.matcher(name);

            if (match.find()) {
                return match.replaceAll(entry.getValue());
            }

        }

        return newName;
    }
This class implements a middleware to apply regex to blob names.
The regex are configured as:
s3proxy.regex-blobstore.match.&lt;regex name&gt; = &lt;regex match
expression&gt;
s3proxy.regex-blobstore.replace.&lt;regex name&gt; = &lt;regex replace
expression&gt;

You can add multiple regex, they will be applied from the beginning to the
end,
stopping as soon as the first regex matches.
src/main/java/org/gaul/s3proxy/RegexBlobStore.java