public static Validator<CharSequence> regex(@NonNull final CharSequence errorMessage,
                                                @NonNull final Pattern regex) {
        return new RegexValidator(errorMessage, regex);
    }
public static Validator < CharSequence > regex ( @ NonNull final CharSequence errorMessage , @ NonNull final Pattern regex ) { return new RegexValidator ( errorMessage , regex ) ; }
Creates and returns a validator, which allows to validate texts to ensure, that they match a
certain regular expression.

@param errorMessage
The error message, which should be shown, if the validation fails, as an instance of
the type {@link CharSequence}. The error message may not be null
@param regex
The regular expression, which should be used to validate the texts, as an instance of
the class {@link Pattern}. The regular expression may not be null
@return The validator, which has been created, as an instance of the type {@link Validator}