Table of Contents

Class Regex

Namespace
GLib.Internal
Assembly
GLib-2.0.dll
public class Regex
Inheritance
Regex
Inherited Members

Methods

CheckReplacement(NonNullableUtf8StringHandle, out bool, out ErrorOwnedHandle)

Calls native function g_regex_check_replacement. Version: 2.14

[Version("2.14")]
public static extern bool CheckReplacement(NonNullableUtf8StringHandle replacement, out bool hasReferences, out ErrorOwnedHandle error)

Parameters

replacement NonNullableUtf8StringHandle

Transfer ownership: None Nullable: False

hasReferences bool

Transfer ownership: Full Nullable: False

error ErrorOwnedHandle

Returns

bool

Transfer ownership: None Nullable: False

ErrorQuark()

Calls native function g_regex_error_quark.

public static extern uint ErrorQuark()

Returns

uint

Transfer ownership: None Nullable: False

EscapeNul(NonNullableUtf8StringHandle, int)

Calls native function g_regex_escape_nul. Version: 2.30

[Version("2.30")]
public static extern NonNullableUtf8StringOwnedHandle EscapeNul(NonNullableUtf8StringHandle @string, int length)

Parameters

string NonNullableUtf8StringHandle
length int

Transfer ownership: None Nullable: False

Returns

NonNullableUtf8StringOwnedHandle

Transfer ownership: Full Nullable: False

EscapeString(NonNullableUtf8StringHandle, int)

Calls native function g_regex_escape_string. Version: 2.14

[Version("2.14")]
public static extern NonNullableUtf8StringOwnedHandle EscapeString(NonNullableUtf8StringHandle @string, int length)

Parameters

string NonNullableUtf8StringHandle
length int

Transfer ownership: None Nullable: False

Returns

NonNullableUtf8StringOwnedHandle

Transfer ownership: Full Nullable: False

GetCaptureCount(RegexHandle)

Calls native method g_regex_get_capture_count. Version: 2.14

[Version("2.14")]
public static extern int GetCaptureCount(RegexHandle regex)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

Returns

int

Transfer ownership: None Nullable: False

GetCompileFlags(RegexHandle)

Calls native method g_regex_get_compile_flags. Version: 2.26

[Version("2.26")]
public static extern RegexCompileFlags GetCompileFlags(RegexHandle regex)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

Returns

RegexCompileFlags

Transfer ownership: None Nullable: False

GetGType()

Calls native function g_regex_get_type.

public static extern nuint GetGType()

Returns

nuint

Transfer ownership: None Nullable: False

GetHasCrOrLf(RegexHandle)

Calls native method g_regex_get_has_cr_or_lf. Version: 2.34

[Version("2.34")]
public static extern bool GetHasCrOrLf(RegexHandle regex)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

Returns

bool

Transfer ownership: None Nullable: False

GetMatchFlags(RegexHandle)

Calls native method g_regex_get_match_flags. Version: 2.26

[Version("2.26")]
public static extern RegexMatchFlags GetMatchFlags(RegexHandle regex)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

Returns

RegexMatchFlags

Transfer ownership: None Nullable: False

GetMaxBackref(RegexHandle)

Calls native method g_regex_get_max_backref. Version: 2.14

[Version("2.14")]
public static extern int GetMaxBackref(RegexHandle regex)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

Returns

int

Transfer ownership: None Nullable: False

GetMaxLookbehind(RegexHandle)

Calls native method g_regex_get_max_lookbehind. Version: 2.38

[Version("2.38")]
public static extern int GetMaxLookbehind(RegexHandle regex)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

Returns

int

Transfer ownership: None Nullable: False

GetPattern(RegexHandle)

Calls native method g_regex_get_pattern. Version: 2.14

[Version("2.14")]
public static extern NonNullableUtf8StringUnownedHandle GetPattern(RegexHandle regex)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

Returns

NonNullableUtf8StringUnownedHandle

Transfer ownership: None Nullable: False

GetStringNumber(RegexHandle, NonNullableUtf8StringHandle)

Calls native method g_regex_get_string_number. Version: 2.14

[Version("2.14")]
public static extern int GetStringNumber(RegexHandle regex, NonNullableUtf8StringHandle name)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

name NonNullableUtf8StringHandle

Transfer ownership: None Nullable: False

Returns

int

Transfer ownership: None Nullable: False

MatchSimple(NonNullableUtf8StringHandle, NonNullableUtf8StringHandle, RegexCompileFlags, RegexMatchFlags)

Calls native function g_regex_match_simple. Version: 2.14

[Version("2.14")]
public static extern bool MatchSimple(NonNullableUtf8StringHandle pattern, NonNullableUtf8StringHandle @string, RegexCompileFlags compileOptions, RegexMatchFlags matchOptions)

Parameters

pattern NonNullableUtf8StringHandle

Transfer ownership: None Nullable: False

string NonNullableUtf8StringHandle
compileOptions RegexCompileFlags

Transfer ownership: None Nullable: False

matchOptions RegexMatchFlags

Transfer ownership: None Nullable: False

Returns

bool

Transfer ownership: None Nullable: False

New(NonNullableUtf8StringHandle, RegexCompileFlags, RegexMatchFlags, out ErrorOwnedHandle)

Calls native constructor g_regex_new. Version: 2.14

[Version("2.14")]
public static extern RegexOwnedHandle New(NonNullableUtf8StringHandle pattern, RegexCompileFlags compileOptions, RegexMatchFlags matchOptions, out ErrorOwnedHandle error)

Parameters

pattern NonNullableUtf8StringHandle

Transfer ownership: None Nullable: False

compileOptions RegexCompileFlags

Transfer ownership: None Nullable: False

matchOptions RegexMatchFlags

Transfer ownership: None Nullable: False

error ErrorOwnedHandle

Returns

RegexOwnedHandle

Transfer ownership: Full Nullable: True

Ref(RegexHandle)

Calls native method g_regex_ref. Version: 2.14

[Version("2.14")]
public static extern RegexOwnedHandle Ref(RegexHandle regex)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

Returns

RegexOwnedHandle

Transfer ownership: Full Nullable: False

Replace(RegexHandle, string[], long, int, NonNullableUtf8StringHandle, RegexMatchFlags, out ErrorOwnedHandle)

Calls native method g_regex_replace. Version: 2.14

[Version("2.14")]
public static extern NonNullableUtf8StringOwnedHandle Replace(RegexHandle regex, string[] @string, long stringLen, int startPosition, NonNullableUtf8StringHandle replacement, RegexMatchFlags matchOptions, out ErrorOwnedHandle error)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

string string[]
stringLen long

Transfer ownership: None Nullable: False

startPosition int

Transfer ownership: None Nullable: False

replacement NonNullableUtf8StringHandle

Transfer ownership: None Nullable: False

matchOptions RegexMatchFlags

Transfer ownership: None Nullable: False

error ErrorOwnedHandle

Returns

NonNullableUtf8StringOwnedHandle

Transfer ownership: Full Nullable: False

ReplaceEval(RegexHandle, string[], long, int, RegexMatchFlags, RegexEvalCallback, IntPtr, out ErrorOwnedHandle)

Calls native method g_regex_replace_eval. Version: 2.14

[Version("2.14")]
public static extern NonNullableUtf8StringOwnedHandle ReplaceEval(RegexHandle regex, string[] @string, long stringLen, int startPosition, RegexMatchFlags matchOptions, RegexEvalCallback eval, IntPtr userData, out ErrorOwnedHandle error)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

string string[]
stringLen long

Transfer ownership: None Nullable: False

startPosition int

Transfer ownership: None Nullable: False

matchOptions RegexMatchFlags

Transfer ownership: None Nullable: False

eval RegexEvalCallback

Transfer ownership: None Nullable: False

userData IntPtr

Transfer ownership: None Nullable: True

error ErrorOwnedHandle

Returns

NonNullableUtf8StringOwnedHandle

Transfer ownership: Full Nullable: False

ReplaceLiteral(RegexHandle, string[], long, int, NonNullableUtf8StringHandle, RegexMatchFlags, out ErrorOwnedHandle)

Calls native method g_regex_replace_literal. Version: 2.14

[Version("2.14")]
public static extern NonNullableUtf8StringOwnedHandle ReplaceLiteral(RegexHandle regex, string[] @string, long stringLen, int startPosition, NonNullableUtf8StringHandle replacement, RegexMatchFlags matchOptions, out ErrorOwnedHandle error)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

string string[]
stringLen long

Transfer ownership: None Nullable: False

startPosition int

Transfer ownership: None Nullable: False

replacement NonNullableUtf8StringHandle

Transfer ownership: None Nullable: False

matchOptions RegexMatchFlags

Transfer ownership: None Nullable: False

error ErrorOwnedHandle

Returns

NonNullableUtf8StringOwnedHandle

Transfer ownership: Full Nullable: False

Split(RegexHandle, NonNullableUtf8StringHandle, RegexMatchFlags)

Calls native method g_regex_split. Version: 2.14

[Version("2.14")]
public static extern Utf8StringArrayNullTerminatedOwnedHandle Split(RegexHandle regex, NonNullableUtf8StringHandle @string, RegexMatchFlags matchOptions)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

string NonNullableUtf8StringHandle
matchOptions RegexMatchFlags

Transfer ownership: None Nullable: False

Returns

Utf8StringArrayNullTerminatedOwnedHandle

Transfer ownership: Full Nullable: False

SplitFull(RegexHandle, string[], long, int, RegexMatchFlags, int, out ErrorOwnedHandle)

Calls native method g_regex_split_full. Version: 2.14

[Version("2.14")]
public static extern Utf8StringArrayNullTerminatedOwnedHandle SplitFull(RegexHandle regex, string[] @string, long stringLen, int startPosition, RegexMatchFlags matchOptions, int maxTokens, out ErrorOwnedHandle error)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False

string string[]
stringLen long

Transfer ownership: None Nullable: False

startPosition int

Transfer ownership: None Nullable: False

matchOptions RegexMatchFlags

Transfer ownership: None Nullable: False

maxTokens int

Transfer ownership: None Nullable: False

error ErrorOwnedHandle

Returns

Utf8StringArrayNullTerminatedOwnedHandle

Transfer ownership: Full Nullable: False

SplitSimple(NonNullableUtf8StringHandle, NonNullableUtf8StringHandle, RegexCompileFlags, RegexMatchFlags)

Calls native function g_regex_split_simple. Version: 2.14

[Version("2.14")]
public static extern Utf8StringArrayNullTerminatedOwnedHandle SplitSimple(NonNullableUtf8StringHandle pattern, NonNullableUtf8StringHandle @string, RegexCompileFlags compileOptions, RegexMatchFlags matchOptions)

Parameters

pattern NonNullableUtf8StringHandle

Transfer ownership: None Nullable: False

string NonNullableUtf8StringHandle
compileOptions RegexCompileFlags

Transfer ownership: None Nullable: False

matchOptions RegexMatchFlags

Transfer ownership: None Nullable: False

Returns

Utf8StringArrayNullTerminatedOwnedHandle

Transfer ownership: Full Nullable: False

Unref(RegexHandle)

Calls native method g_regex_unref. Version: 2.14

[Version("2.14")]
public static extern void Unref(RegexHandle regex)

Parameters

regex RegexHandle

Transfer ownership: None Nullable: False