Enum Class RegexPattern.ModifierFlag
- All Implemented Interfaces:
Serializable,Comparable<RegexPattern.ModifierFlag>,Constable
- Enclosing interface:
RegexPattern
Regex modifiers that can be enabled or disabled inline.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEnables canonical equivalence matching (c).Enables case-insensitive matching (i).Enables comments and whitespace in pattern (x).Enables dotall mode (s), where.matches any character including line terminators.Enables multiline mode (m), where^and$match at the beginning/end of line.Enables Unicode-aware case folding (u).Enables Unicode character class support (U).Enables Unix lines mode (d), where only'\n'is recognized as a line terminator. -
Method Summary
Modifier and TypeMethodDescriptiontoString()static RegexPattern.ModifierFlagReturns the enum constant of this class with the specified name.static RegexPattern.ModifierFlag[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CASE_INSENSITIVE
Enables case-insensitive matching (i). -
UNIX_LINES
Enables Unix lines mode (d), where only'\n'is recognized as a line terminator. -
MULTILINE
Enables multiline mode (m), where^and$match at the beginning/end of line. -
DOTALL
Enables dotall mode (s), where.matches any character including line terminators. -
UNICODE_CASE
Enables Unicode-aware case folding (u). -
COMMENTS
Enables comments and whitespace in pattern (x). -
UNICODE_CHARACTER_CLASS
Enables Unicode character class support (U). -
CANONICAL_EQUIVALENCE
Enables canonical equivalence matching (c).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
toString
- Overrides:
toStringin classEnum<RegexPattern.ModifierFlag>
-