public static Predicate regex(final String attribute, final String pattern, final ClassLoader classLoader, final boolean requireFullMatch) {
        return new RegularExpressionPredicate(pattern, ExchangeAttributes.parser(classLoader).parse(attribute), requireFullMatch);
    }
public static Predicate regex ( final String attribute , final String pattern , final ClassLoader classLoader , final boolean requireFullMatch ) { return new RegularExpressionPredicate ( pattern , ExchangeAttributes . parser ( classLoader ) . parse ( attribute ) , requireFullMatch ) ; }
Creates a predicate that matches the given attribute against a regex.
@param requireFullMatch If a full match is required in order to return true.
@param attribute The attribute to check against.
@param pattern The pattern to look for.