private Pair<Pattern, String> mapPattern(final Object p) {
        val patternValue = p.toString();
        val index = patternValue.indexOf("->");
        if (index != -1) {
            val patternStr = patternValue.substring(0, index).trim();
            val pattern = RegexUtils.createPattern(patternStr, isCaseInsensitive() ? Pattern.CASE_INSENSITIVE : 0);
            val returnValue = patternValue.substring(index + 2).trim();
            LOGGER.debug("Created attribute filter pattern [{}] with the mapped return value template [{}]", patternStr, returnValue);
            return Pair.of(pattern, returnValue);
        }
        val pattern = RegexUtils.createPattern(patternValue.trim(), isCaseInsensitive() ? Pattern.CASE_INSENSITIVE : 0);
        LOGGER.debug("Created attribute filter pattern [{}] without a mapped return value template", pattern.pattern());
        return Pair.of(pattern, StringUtils.EMPTY);
    }
This is {@link RegisteredServiceMutantRegexAttributeFilter}.

@author Misagh Moayyed
@since 5.3.0
core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/support/RegisteredServiceMutantRegexAttributeFilter.java