Regex.EnumerateMatches Method
Definition
Namespace: Corvus.Ecma262.RegularExpressions
Assembly: Corvus.Regex.Ecma262.dll
Overloads
| Method | Description |
|---|---|
| EnumerateMatches(ReadOnlySpan<char>) | Enumerates the matches in a UTF-16 text, allocating nothing. |
| EnumerateMatches(ReadOnlySpan<char>, int) | Enumerates the matches in a UTF-16 text at or after a position, allocating nothing. |
| EnumerateMatches(ReadOnlySpan<byte>) | Enumerates the matches in a UTF-8 text, allocating nothing. |
| EnumerateMatches(ReadOnlySpan<byte>, int) | Enumerates the matches in a UTF-8 text at or after a position, allocating nothing. |
| EnumerateMatches(ReadOnlySpan<char>, Span<ValueCapture>) | Enumerates the matches in a UTF-16 text, allocating nothing, and reports what each group captured: after each MoveNext the span holds the match as element 0 and each group in order. |
| EnumerateMatches(ReadOnlySpan<char>, int, Span<ValueCapture>) | Enumerates the matches in a UTF-16 text at or after a position, allocating nothing, and reports what each group captured. |
| EnumerateMatches(ReadOnlySpan<byte>, Span<ValueCapture>) | Enumerates the matches in a UTF-8 text, allocating nothing, and reports what each group captured. |
| EnumerateMatches(ReadOnlySpan<byte>, int, Span<ValueCapture>) | Enumerates the matches in a UTF-8 text at or after a position, allocating nothing, and reports what each group captured. |
EnumerateMatches(ReadOnlySpan<char>)
Source: Regex.Matching.cs
Enumerates the matches in a UTF-16 text, allocating nothing.
public ValueMatchEnumerator EnumerateMatches(ReadOnlySpan<char> input)
Parameters
| Name | Type | Description |
|---|---|---|
input |
ReadOnlySpan<char> |
The text. |
Returns
The enumerator.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
EnumerateMatches(ReadOnlySpan<char>, int)
Source: Regex.Matching.cs
Enumerates the matches in a UTF-16 text at or after a position, allocating nothing.
public ValueMatchEnumerator EnumerateMatches(ReadOnlySpan<char> input, int startAt)
Parameters
| Name | Type | Description |
|---|---|---|
input |
ReadOnlySpan<char> |
The text. |
startAt |
int |
The position, in UTF-16 code units. |
Returns
The enumerator.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
EnumerateMatches(ReadOnlySpan<byte>)
Source: Regex.Matching.cs
Enumerates the matches in a UTF-8 text, allocating nothing.
public Utf8ValueMatchEnumerator EnumerateMatches(ReadOnlySpan<byte> utf8)
Parameters
| Name | Type | Description |
|---|---|---|
utf8 |
ReadOnlySpan<byte> |
The text. |
Returns
The enumerator.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
EnumerateMatches(ReadOnlySpan<byte>, int)
Source: Regex.Matching.cs
Enumerates the matches in a UTF-8 text at or after a position, allocating nothing.
public Utf8ValueMatchEnumerator EnumerateMatches(ReadOnlySpan<byte> utf8, int startAt)
Parameters
| Name | Type | Description |
|---|---|---|
utf8 |
ReadOnlySpan<byte> |
The text. |
startAt |
int |
The position, in bytes, at the start of a character. |
Returns
The enumerator.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
EnumerateMatches(ReadOnlySpan<char>, Span<ValueCapture>)
Source: Regex.Spans.cs
Enumerates the matches in a UTF-16 text, allocating nothing, and reports what each group captured: after each MoveNext the span holds the match as element 0 and each group in order.
public ValueMatchEnumerator EnumerateMatches(ReadOnlySpan<char> input, Span<ValueCapture> captures)
Parameters
| Name | Type | Description |
|---|---|---|
input |
ReadOnlySpan<char> |
The text. |
captures |
Span<ValueCapture> |
Receives the captures of each match; its length must be at least GroupCount + 1. |
Returns
The enumerator.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
EnumerateMatches(ReadOnlySpan<char>, int, Span<ValueCapture>)
Source: Regex.Spans.cs
Enumerates the matches in a UTF-16 text at or after a position, allocating nothing, and reports what each group captured.
public ValueMatchEnumerator EnumerateMatches(ReadOnlySpan<char> input, int startAt, Span<ValueCapture> captures)
Parameters
| Name | Type | Description |
|---|---|---|
input |
ReadOnlySpan<char> |
The text. |
startAt |
int |
The position, in UTF-16 code units. |
captures |
Span<ValueCapture> |
Receives the captures of each match; its length must be at least GroupCount + 1. |
Returns
The enumerator.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
EnumerateMatches(ReadOnlySpan<byte>, Span<ValueCapture>)
Source: Regex.Spans.cs
Enumerates the matches in a UTF-8 text, allocating nothing, and reports what each group captured.
public Utf8ValueMatchEnumerator EnumerateMatches(ReadOnlySpan<byte> utf8, Span<ValueCapture> captures)
Parameters
| Name | Type | Description |
|---|---|---|
utf8 |
ReadOnlySpan<byte> |
The text. |
captures |
Span<ValueCapture> |
Receives the captures of each match; its length must be at least GroupCount + 1. |
Returns
The enumerator.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
EnumerateMatches(ReadOnlySpan<byte>, int, Span<ValueCapture>)
Source: Regex.Spans.cs
Enumerates the matches in a UTF-8 text at or after a position, allocating nothing, and reports what each group captured.
public Utf8ValueMatchEnumerator EnumerateMatches(ReadOnlySpan<byte> utf8, int startAt, Span<ValueCapture> captures)
Parameters
| Name | Type | Description |
|---|---|---|
utf8 |
ReadOnlySpan<byte> |
The text. |
startAt |
int |
The position, in bytes, at the start of a character. |
captures |
Span<ValueCapture> |
Receives the captures of each match; its length must be at least GroupCount + 1. |
Returns
The enumerator.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests.
Open an issue