private List<Object> getPatternValuesFor(final List<Object> currentValues,
                                             final AttributeDefinitionResolutionContext context) {
        return patterns
            .entrySet()
            .stream()
            .map(entry -> {
                val pattern = RegexUtils.createPattern(entry.getKey());
                return currentValues.stream()
                    .filter(value -> RegexUtils.find(pattern, value.toString()))
                    .map(value -> getScriptedPatternedValue(value, entry.getValue(), context))
                    .findFirst()
                    .orElse(StringUtils.EMPTY);
            })
            .filter(StringUtils::isNotBlank)
            .collect(Collectors.toList());
    }
This is {@link DefaultAttributeDefinition}.

@author Misagh Moayyed
@author Travis Schmidt
@since 6.2.0
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/attribute/DefaultAttributeDefinition.java