Package org.craftercms.commons.lang
Class RegexUtils
java.lang.Object
org.craftercms.commons.lang.RegexUtils
Utility methods for regex related operations.
- Author:
- avasquez
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
matchesAny
(String str, String... regexes) Returns true if the string matches any of the specified regexes.static boolean
matchesAny
(String str, List<String> regexes) Returns true if the string matches (full match) any of the specified regexes.static boolean
matchesAny
(String str, List<String> regexes, boolean fullMatch) Returns true if the string matches any of the specified regexes.
-
Method Details
-
matchesAny
Returns true if the string matches any of the specified regexes.- Parameters:
str
- the string to matchregexes
- the regexes used for matching- Returns:
- true if the string matches one or more of the regexes
-
matchesAny
Returns true if the string matches (full match) any of the specified regexes.- Parameters:
str
- the string to matchregexes
- the regexes used for matching- Returns:
- true if the string matches (full match) one or more of the regexes
-
matchesAny
Returns true if the string matches any of the specified regexes.- Parameters:
str
- the string to matchregexes
- the regexes used for matchingfullMatch
- if the entire string should be matched- Returns:
- true if the string matches one or more of the regexes
-