Enumeration (GI Flags)

GLib-2.0GLibRegexMatchFlagsSince 2.14

Flags specifying match-time options.

2.14

Index
ANCHORED: 16

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.

BSR_ANY: 16777216

Overrides the newline definition for \R set when creating a new GLib.Regex; any Unicode newline characters or character sequences are recognized as a newline by \R. These are \r, \n and \r\n, 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

BSR_ANYCRLF: 8388608

Overrides the newline definition for \R set when creating a new GLib.Regex; only \r, \n, or \r\n character sequences are recognized as a newline by \R. Since: 2.34

DEFAULT: 0

No special options set.

2.74

NEWLINE_ANY: 4194304

Overrides the newline definition set when creating a new GLib.Regex, any Unicode newline sequence is recognised as a newline. These are \r, \n and \r\n, 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: 5242880

Overrides the newline definition set when creating a new GLib.Regex; any \r, \n, or \r\n character sequence is recognized as a newline. Since: 2.34

NEWLINE_CR: 1048576

Overrides the newline definition set when creating a new GLib.Regex, setting the \r character as line terminator.

NEWLINE_CRLF: 3145728

Overrides the newline definition set when creating a new GLib.Regex, setting the \r\n character sequence as line terminator.

NEWLINE_LF: 2097152

Overrides the newline definition set when creating a new GLib.Regex, setting the \n character as line terminator.

NOTBOL: 128

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 without GLib.RegexCompileFlags.MULTILINE (at compile time) causes circumflex never to match. This option affects only the behaviour of the circumflex metacharacter, it does not affect \A.

NOTEMPTY: 1024

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 GLib.Regex searches further into the string for occurrences of a or b.

NOTEMPTY_ATSTART: 268435456

Like GLib.RegexMatchFlags.NOTEMPTY, but only applied to the start of the matched string. For anchored patterns this can only happen for pattern containing \K. Since: 2.34

NOTEOL: 256

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 without GLib.RegexCompileFlags.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.

PARTIAL: 32768

Turns on the partial matching feature, for more documentation on partial matching see GLib.MatchInfo.is_partial_match.

PARTIAL_HARD: 134217728

Turns on the partial matching feature. In contrast to GLib.RegexMatchFlags.PARTIAL_SOFT, this stops matching as soon as a partial match is found, without continuing to search for a possible complete match. See GLib.MatchInfo.is_partial_match for more information. Since: 2.34

PARTIAL_SOFT: 32768

An alias for GLib.RegexMatchFlags.PARTIAL. Since: 2.34