Package org.gnome.glib
Enum Class RegexMatchFlags
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<RegexMatchFlags>
,Constable
@Generated("io.github.jwharm.JavaGI")
public enum RegexMatchFlags
extends Enum<RegexMatchFlags>
implements Enumeration
Flags specifying match-time options.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched.Overrides the newline definition for "\\R" set when creating a newGRegex
; any Unicode newline character or character sequence are recognized as a newline by "\\R".Overrides the newline definition for "\\R" set when creating a newGRegex
; only '\\r', '\\n', or '\\r\\n' character sequences are recognized as a newline by "\\R".No special options set.Overrides the newline definition set when creating a newGRegex
, any Unicode newline sequence is recognised as a newline.Overrides the newline definition set when creating a newGRegex
; any '\\r', '\\n', or '\\r\\n' character sequence is recognized as a newline.Overrides the newline definition set when creating a newGRegex
, setting the '\\r' character as line terminator.Overrides the newline definition set when creating a newGRegex
, setting the '\\r\\n' characters sequence as line terminator.Overrides the newline definition set when creating a newGRegex
, setting the '\\n' character as line terminator.Specifies that first character of the string is not the beginning of a line, so the circumflex metacharacter should not match before it.An empty string is not considered to be a valid match if this option is set.LikeNOTEMPTY
, but only applied to the start of the matched string.Specifies that the end of the subject string is not the end of a line, so the dollar metacharacter should not match it nor (except in multiline mode) a newline immediately before it.Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().Turns on the partial matching feature. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
Get the numeric value of this enumstatic RegexMatchFlags
of
(int value) Create a new RegexMatchFlags for the provided valuestatic RegexMatchFlags
Returns the enum constant of this class with the specified name.static RegexMatchFlags[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
No special options set. Since: 2.74 -
ANCHORED
The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharacter. -
NOTBOL
Specifies that first character of the string is not the beginning of a line, so the circumflex metacharacter should not match before it. Setting this withoutRegexCompileFlags.MULTILINE
(at compile time) causes circumflex never to match. This option affects only the behaviour of the circumflex metacharacter, it does not affect "\\A". -
NOTEOL
Specifies that the end of the subject string is not the end of a line, so the dollar metacharacter should not match it nor (except in multiline mode) a newline immediately before it. Setting this withoutRegexCompileFlags.MULTILINE
(at compile time) causes dollar never to match. This option affects only the behaviour of the dollar metacharacter, it does not affect "\\Z" or "\\z". -
NOTEMPTY
An empty string is not considered to be a valid match if this option is set. If there are alternatives in the pattern, they are tried. If all the alternatives match the empty string, the entire match fails. For example, if the pattern "a?b?" is applied to a string not beginning with "a" or "b", it matches the empty string at the start of the string. With this flag set, this match is not valid, so GRegex searches further into the string for occurrences of "a" or "b". -
PARTIAL
Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match(). -
NEWLINE_CR
Overrides the newline definition set when creating a newGRegex
, setting the '\\r' character as line terminator. -
NEWLINE_LF
Overrides the newline definition set when creating a newGRegex
, setting the '\\n' character as line terminator. -
NEWLINE_CRLF
Overrides the newline definition set when creating a newGRegex
, setting the '\\r\\n' characters sequence as line terminator. -
NEWLINE_ANY
Overrides the newline definition set when creating a newGRegex
, any Unicode newline sequence is recognised as a newline. These are '\\r', '\\n' and '\\rn', and the single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR. -
NEWLINE_ANYCRLF
Overrides the newline definition set when creating a newGRegex
; any '\\r', '\\n', or '\\r\\n' character sequence is recognized as a newline. Since: 2.34 -
BSR_ANYCRLF
Overrides the newline definition for "\\R" set when creating a newGRegex
; only '\\r', '\\n', or '\\r\\n' character sequences are recognized as a newline by "\\R". Since: 2.34 -
BSR_ANY
Overrides the newline definition for "\\R" set when creating a newGRegex
; any Unicode newline character or character sequence are recognized as a newline by "\\R". These are '\\r', '\\n' and '\\rn', and the single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR. Since: 2.34 -
PARTIAL_HARD
Turns on the partial matching feature. In contrast to toPARTIAL_SOFT
, this stops matching as soon as a partial match is found, without continuing to search for a possible complete match. See g_match_info_is_partial_match() for more information. Since: 2.34 -
NOTEMPTY_ATSTART
LikeNOTEMPTY
, but only applied to the start of the matched string. For anchored patterns this can only happen for pattern containing "\\K". Since: 2.34
-
-
Field Details
-
PARTIAL_SOFT
An alias forPARTIAL
. Since: 2.34
-
-
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
-
of
Create a new RegexMatchFlags for the provided value- Parameters:
value
- the bitfield value- Returns:
- the bitfield for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-