default Pattern buildNamingPattern(final String... extensions) {
        var pattern = StringUtils.EMPTY;
        if (extensions.length > 0) {
            pattern = String.join("|", extensions);
        }
        if (extensions.length > 1) {
            pattern = '(' + pattern + ')';
        }
        return RegexUtils.createPattern("(\\w+-)+(\\d+)\\.".concat(pattern));
    }
Gets naming pattern.

@param extensions the extensions
@return the naming pattern
core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/resource/RegisteredServiceResourceNamingStrategy.java