Class RegexFlags
java.lang.Object
org.springframework.data.mongodb.util.RegexFlags
Utility to translate
regex flags
to MongoDB regex options and vice versa.- Since:
- 3.3
- Author:
- Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
toRegexFlag
(char c) Lookup the MongoDB specific flags for a given character.static int
toRegexFlags
(@Nullable String s) Lookup the MongoDB specific flags for a given regex option string.static String
toRegexOptions
(int flags) Lookup the MongoDB specific options from givenflags
.
-
Method Details
-
toRegexOptions
-
toRegexFlags
-
toRegexFlag
public static int toRegexFlag(char c) Lookup the MongoDB specific flags for a given character.- Parameters:
c
- the Regex option/flag to look up.- Returns:
- Throws:
IllegalArgumentException
- for unknown flags- Since:
- 2.2
-