Class PatternMatchUtils
java.lang.Object
org.springframework.integration.support.utils.PatternMatchUtils
Utility methods for pattern matching.
This utilities provide support of negative pattern matching as well
unlike
PatternMatchUtils.- Since:
- 5.0
- Author:
- Meherzad Lahewala, Artem Bilan
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic BooleansmartMatch(String str, String... patterns) Pattern match against the supplied patterns; also supports negated ('!') patterns.static BooleansmartMatchIgnoreCase(String str, String... patterns) Pattern match against the supplied patterns ignoring case; also supports negated ('!') patterns.
-
Method Details
-
smartMatchIgnoreCase
Pattern match against the supplied patterns ignoring case; also supports negated ('!') patterns. First match wins (positive or negative). To match the names starting with!symbol, you have to escape it prepending with the\symbol in the pattern definition.- Parameters:
str- the string to match.patterns- the patterns.- Returns:
- true for positive match; false for negative; null if no pattern matches.
- Since:
- 5.0.5
- See Also:
-
smartMatch
Pattern match against the supplied patterns; also supports negated ('!') patterns. First match wins (positive or negative). To match the names starting with!symbol, you have to escape it prepending with the\symbol in the pattern definition.- Parameters:
str- the string to match.patterns- the patterns.- Returns:
- true for positive match; false for negative; null if no pattern matches.
- See Also:
-