RegexCaptureInfo Struct

Describes one capture group of a pattern.

public readonly struct RegexCaptureInfo : IEquatable<RegexCaptureInfo>
Implements

Constructors

NameDescription
RegexCaptureInfo(int, string, TextSpan)Describes one capture group of a pattern.

RegexCaptureInfo(int, string, TextSpan)

Describes one capture group of a pattern.

public RegexCaptureInfo(int Number, string Name, TextSpan Span)

Parameters

Number int
The group number the engine assigns.
Name string
The group name. For an unnamed group this is the number written out.
Span TextSpan
The span of the construct that declares the group.

Properties

NameDescription
NameThe group name. For an unnamed group this is the number written out.
NumberThe group number the engine assigns.
SpanThe span of the construct that declares the group.

The group name. For an unnamed group this is the number written out.

public string Name { get; init; }

Property value

string

The group number the engine assigns.

public int Number { get; init; }

Property value

int

The span of the construct that declares the group.

public TextSpan Span { get; init; }

Property value

TextSpan

Methods

NameDescription
Deconstruct(int, string, TextSpan)
Equals(RegexCaptureInfo)
Equals(object)
GetHashCode()
ToString()

Deconstruct(int, string, TextSpan)

public void Deconstruct(out int Number, out string Name, out TextSpan Span)

Parameters

Number int
Name string
Span TextSpan

No documentation is available.

Equals overloads

Equals(RegexCaptureInfo)

public bool Equals(RegexCaptureInfo other)
Parameters
other RegexCaptureInfo
Returns

bool

No documentation is available.

Equals(object)

public override bool Equals(object obj)
Parameters
obj object
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(RegexCaptureInfo, RegexCaptureInfo)
operator !=(RegexCaptureInfo, RegexCaptureInfo)

operator ==(RegexCaptureInfo, RegexCaptureInfo)

public static bool operator ==(RegexCaptureInfo left, RegexCaptureInfo right)

Parameters

left RegexCaptureInfo
right RegexCaptureInfo

Returns

bool

No documentation is available.

operator !=(RegexCaptureInfo, RegexCaptureInfo)

public static bool operator !=(RegexCaptureInfo left, RegexCaptureInfo right)

Parameters

left RegexCaptureInfo
right RegexCaptureInfo

Returns

bool

No documentation is available.