Class Regex
- Namespace
- GLib
- Assembly
- GLib-2.0.dll
public sealed class Regex : BoxedRecord, IEquatable<Regex>
- Inheritance
-
Regex
- Implements
- Inherited Members
Constructors
Regex(RegexOwnedHandle)
public Regex(RegexOwnedHandle handle)
Parameters
handle
RegexOwnedHandle
Properties
Handle
public RegexOwnedHandle Handle { get; }
Property Value
Methods
CheckReplacement(string, out bool)
[Version("2.14")]
public static bool CheckReplacement(string replacement, out bool hasReferences)
Parameters
Returns
Equals(Regex?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Regex? other)
Parameters
other
RegexAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
ErrorQuark()
public static Quark ErrorQuark()
Returns
EscapeNul(string, int)
[Version("2.30")]
public static string EscapeNul(string @string, int length)
Parameters
Returns
EscapeString(string, int)
[Version("2.14")]
public static string EscapeString(string @string, int length)
Parameters
Returns
GetCaptureCount()
[Version("2.14")]
public int GetCaptureCount()
Returns
GetCompileFlags()
[Version("2.26")]
public RegexCompileFlags GetCompileFlags()
Returns
GetGType()
public static Type GetGType()
Returns
GetHasCrOrLf()
[Version("2.34")]
public bool GetHasCrOrLf()
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetMatchFlags()
[Version("2.26")]
public RegexMatchFlags GetMatchFlags()
Returns
GetMaxBackref()
[Version("2.14")]
public int GetMaxBackref()
Returns
GetMaxLookbehind()
[Version("2.38")]
public int GetMaxLookbehind()
Returns
GetPattern()
[Version("2.14")]
public string GetPattern()
Returns
GetStringNumber(string)
[Version("2.14")]
public int GetStringNumber(string name)
Parameters
name
string
Returns
MatchSimple(string, string, RegexCompileFlags, RegexMatchFlags)
[Version("2.14")]
public static bool MatchSimple(string pattern, string @string, RegexCompileFlags compileOptions, RegexMatchFlags matchOptions)
Parameters
pattern
stringstring
stringcompileOptions
RegexCompileFlagsmatchOptions
RegexMatchFlags
Returns
New(string, RegexCompileFlags, RegexMatchFlags)
[Version("2.14")]
public static Regex? New(string pattern, RegexCompileFlags compileOptions, RegexMatchFlags matchOptions)
Parameters
pattern
stringcompileOptions
RegexCompileFlagsmatchOptions
RegexMatchFlags
Returns
Ref()
[Version("2.14")]
public Regex Ref()
Returns
Replace(string[], long, int, string, RegexMatchFlags)
[Version("2.14")]
public string Replace(string[] @string, long stringLen, int startPosition, string replacement, RegexMatchFlags matchOptions)
Parameters
string
string[]stringLen
longstartPosition
intreplacement
stringmatchOptions
RegexMatchFlags
Returns
ReplaceEval(string[], long, int, RegexMatchFlags, RegexEvalCallback)
[Version("2.14")]
public string ReplaceEval(string[] @string, long stringLen, int startPosition, RegexMatchFlags matchOptions, RegexEvalCallback eval)
Parameters
string
string[]stringLen
longstartPosition
intmatchOptions
RegexMatchFlagseval
RegexEvalCallback
Returns
ReplaceLiteral(string[], long, int, string, RegexMatchFlags)
[Version("2.14")]
public string ReplaceLiteral(string[] @string, long stringLen, int startPosition, string replacement, RegexMatchFlags matchOptions)
Parameters
string
string[]stringLen
longstartPosition
intreplacement
stringmatchOptions
RegexMatchFlags
Returns
Split(string, RegexMatchFlags)
[Version("2.14")]
public string[] Split(string @string, RegexMatchFlags matchOptions)
Parameters
string
stringmatchOptions
RegexMatchFlags
Returns
- string[]
SplitFull(string[], long, int, RegexMatchFlags, int)
[Version("2.14")]
public string[] SplitFull(string[] @string, long stringLen, int startPosition, RegexMatchFlags matchOptions, int maxTokens)
Parameters
string
string[]stringLen
longstartPosition
intmatchOptions
RegexMatchFlagsmaxTokens
int
Returns
- string[]
SplitSimple(string, string, RegexCompileFlags, RegexMatchFlags)
[Version("2.14")]
public static string[] SplitSimple(string pattern, string @string, RegexCompileFlags compileOptions, RegexMatchFlags matchOptions)
Parameters
pattern
stringstring
stringcompileOptions
RegexCompileFlagsmatchOptions
RegexMatchFlags
Returns
- string[]
Unref()
[Version("2.14")]
public void Unref()