PatternMatchUtils

Utility methods for simple pattern matching, in particular for Spring's typical "xxx*", "*xxx" and "*xxx*" pattern styles.

@author Juergen Hoeller

Members

Static functions

simpleMatch
bool simpleMatch(string pattern, string str)

Match a string against the given pattern, supporting the following simple pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an arbitrary number of pattern parts), as well as direct equality. @param pattern the pattern to match against @param str the string to match @return whether the string matches the given pattern

simpleMatch
bool simpleMatch(string[] patterns, string str)

Match a string against the given patterns, supporting the following simple pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an arbitrary number of pattern parts), as well as direct equality. @param patterns the patterns to match against @param str the string to match @return whether the string matches any of the given patterns

Meta