This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
| Name | Description |
|---|---|
| EnumerateSplits(ReadOnlySpan<Char>) | Searches an input span for all occurrences of a regular expression and returns aRegex.ValueSplitEnumerator to iterate over the splits around matches. |
| EnumerateSplits(ReadOnlySpan<Char>, Int32) | Searches an input span for all occurrences of a regular expression and returns aRegex.ValueSplitEnumerator to iterate over the splits around matches. |
| EnumerateSplits(ReadOnlySpan<Char>, String) | Searches an input span for all occurrences of a regular expression and returns aRegex.ValueSplitEnumerator to iterate over the splits around matches. |
| EnumerateSplits(ReadOnlySpan<Char>, Int32, Int32) | Searches an input span for all occurrences of a regular expression and returns aRegex.ValueSplitEnumerator to iterate over the splits around matches. |
| EnumerateSplits(ReadOnlySpan<Char>, String, RegexOptions) | Searches an input span for all occurrences of a regular expression and returns aRegex.ValueSplitEnumerator to iterate over the splits around matches. |
| EnumerateSplits(ReadOnlySpan<Char>, String, RegexOptions, TimeSpan) | Searches an input span for all occurrences of a regular expression and returns aRegex.ValueSplitEnumerator to iterate over the splits around matches. |
Searches an input span for all occurrences of a regular expression and returns aRegex.ValueSplitEnumerator to iterate over the splits around matches.
public: System::Text::RegularExpressions::Regex::ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input);public System.Text.RegularExpressions.Regex.ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input);member this.EnumerateSplits : ReadOnlySpan<char> -> System.Text.RegularExpressions.Regex.ValueSplitEnumeratorPublic Function EnumerateSplits (input As ReadOnlySpan(Of Char)) As Regex.ValueSplitEnumeratorThe span to search for a match.
ARegex.ValueSplitEnumerator to iterate over the matches.
The behavior ofEnumerateSplits(ReadOnlySpan<Char>) is similar to the behavior ofSplit(String), producing the splits one at a time as part of iterating through the resulting enumerator rather than all at once as part of a single array. However, there are a few notable differences.Split(String) will include the contents of capture groups in the resulting splits, whileEnumerateSplits(ReadOnlySpan<Char>) will not. And ifRightToLeft is specified,Split(String) will reverse the order of the resulting splits to be left-to-right, whereasEnumerateSplits(ReadOnlySpan<Char>) will yield the splits in the order they're found right-to-left.
Each match won't actually happen untilMoveNext() is invoked on the enumerator, with one match being performed perMoveNext() call. Since the evaluation of the match happens lazily, any changes to the passed in input in between calls toMoveNext() may affect the match results; such changes should be avoided and are not supported.
Searches an input span for all occurrences of a regular expression and returns aRegex.ValueSplitEnumerator to iterate over the splits around matches.
public: System::Text::RegularExpressions::Regex::ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input, int count);public System.Text.RegularExpressions.Regex.ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input, int count);member this.EnumerateSplits : ReadOnlySpan<char> * int -> System.Text.RegularExpressions.Regex.ValueSplitEnumeratorPublic Function EnumerateSplits (input As ReadOnlySpan(Of Char), count As Integer) As Regex.ValueSplitEnumeratorThe span to search for a match.
The maximum number of times the split can occur. If 0, all splits are available.
ARegex.ValueSplitEnumerator to iterate over the matches.
The behavior ofEnumerateSplits(ReadOnlySpan<Char>, Int32) is similar to the behavior ofSplit(String, Int32), producing the splits one at a time as part of iterating through the resulting enumerator rather than all at once as part of a single array. However, there are a few notable differences.Split(String, Int32) will include the contents of capture groups in the resulting splits, whileEnumerateSplits(ReadOnlySpan<Char>, Int32) will not. And ifRightToLeft is specified,Split(String, Int32) will reverse the order of the resulting splits to be left-to-right, whereasEnumerateSplits(ReadOnlySpan<Char>, Int32) will yield the splits in the order they're found right-to-left.
Each match won't actually happen untilMoveNext() is invoked on the enumerator, with one match being performed perMoveNext() call. Since the evaluation of the match happens lazily, any changes to the passed in input in between calls toMoveNext() may affect the match results; such changes should be avoided and are not supported.
Searches an input span for all occurrences of a regular expression and returns aRegex.ValueSplitEnumerator to iterate over the splits around matches.
public: static System::Text::RegularExpressions::Regex::ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input, System::String ^ pattern);public static System.Text.RegularExpressions.Regex.ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input, string pattern);static member EnumerateSplits : ReadOnlySpan<char> * string -> System.Text.RegularExpressions.Regex.ValueSplitEnumeratorPublic Shared Function EnumerateSplits (input As ReadOnlySpan(Of Char), pattern As String) As Regex.ValueSplitEnumeratorThe span to search for a match.
The regular expression pattern to match.
ARegex.ValueSplitEnumerator to iterate over the splits around matches.
pattern isnull.
A regular expression parsing error occurred.
The behavior ofEnumerateSplits(ReadOnlySpan<Char>, String) is similar to the behavior ofSplit(String, String), producing the splits one at a time as part of iterating through the resulting enumerator rather than all at once as part of a single array. However, there are a few notable differences.Split(String, String) will include the contents of capture groups in the resulting splits, whileEnumerateSplits(ReadOnlySpan<Char>, String) will not. And ifRightToLeft is specified,Split(String, String) will reverse the order of the resulting splits to be left-to-right, whereasEnumerateSplits(ReadOnlySpan<Char>, String) will yield the splits in the order they're found right-to-left.
Each match won't actually happen untilMoveNext() is invoked on the enumerator, with one match being performed perMoveNext() call. Since the evaluation of the match happens lazily, any changes to the passed in input in between calls toMoveNext() may affect the match results; such changes should be avoided and are not supported.
Searches an input span for all occurrences of a regular expression and returns aRegex.ValueSplitEnumerator to iterate over the splits around matches.
public: System::Text::RegularExpressions::Regex::ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input, int count, int startat);public System.Text.RegularExpressions.Regex.ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input, int count, int startat);member this.EnumerateSplits : ReadOnlySpan<char> * int * int -> System.Text.RegularExpressions.Regex.ValueSplitEnumeratorPublic Function EnumerateSplits (input As ReadOnlySpan(Of Char), count As Integer, startat As Integer) As Regex.ValueSplitEnumeratorThe span to search for a match.
The maximum number of times the split can occur. If 0, all splits are available.
The zero-based character position at which to start the search.
ARegex.ValueSplitEnumerator to iterate over the matches.
The behavior ofEnumerateSplits(ReadOnlySpan<Char>, Int32, Int32) is similar to the behavior ofSplit(String, Int32, Int32), producing the splits one at a time as part of iterating through the resulting enumerator rather than all at once as part of a single array. However, there are a few notable differences.Split(String, Int32, Int32) will include the contents of capture groups in the resulting splits, whileEnumerateSplits(ReadOnlySpan<Char>, Int32, Int32) will not. And ifRightToLeft is specified,Split(String, Int32, Int32) will reverse the order of the resulting splits to be left-to-right, whereasEnumerateSplits(ReadOnlySpan<Char>, Int32, Int32) will yield the splits in the order they're found right-to-left.
Each match won't actually happen untilMoveNext() is invoked on the enumerator, with one match being performed perMoveNext() call. Since the evaluation of the match happens lazily, any changes to the passed in input in between calls toMoveNext() may affect the match results; such changes should be avoided and are not supported.
Searches an input span for all occurrences of a regular expression and returns aRegex.ValueSplitEnumerator to iterate over the splits around matches.
public: static System::Text::RegularExpressions::Regex::ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input, System::String ^ pattern, System::Text::RegularExpressions::RegexOptions options);public static System.Text.RegularExpressions.Regex.ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input, string pattern, System.Text.RegularExpressions.RegexOptions options);static member EnumerateSplits : ReadOnlySpan<char> * string * System.Text.RegularExpressions.RegexOptions -> System.Text.RegularExpressions.Regex.ValueSplitEnumeratorPublic Shared Function EnumerateSplits (input As ReadOnlySpan(Of Char), pattern As String, options As RegexOptions) As Regex.ValueSplitEnumeratorThe span to search for a match.
The regular expression pattern to match.
A bitwise combination of the enumeration values that specify options for matching.
ARegex.ValueSplitEnumerator to iterate over the splits around matches.
pattern isnull.
options is not a valid bitwise combination of RegexOptions values.
A regular expression parsing error occurred.
The behavior ofEnumerateSplits(ReadOnlySpan<Char>, String, RegexOptions) is similar to the behavior ofSplit(String, String, RegexOptions), producing the splits one at a time as part of iterating through the resulting enumerator rather than all at once as part of a single array. However, there are a few notable differences.Split(String, String, RegexOptions) will include the contents of capture groups in the resulting splits, whileEnumerateSplits(ReadOnlySpan<Char>, String, RegexOptions) will not. And ifRightToLeft is specified,Split(String, String, RegexOptions) will reverse the order of the resulting splits to be left-to-right, whereasEnumerateSplits(ReadOnlySpan<Char>, String, RegexOptions) will yield the splits in the order they're found right-to-left.
Each match won't actually happen untilMoveNext() is invoked on the enumerator, with one match being performed perMoveNext() call. Since the evaluation of the match happens lazily, any changes to the passed in input in between calls toMoveNext() may affect the match results; such changes should be avoided and are not supported.
Searches an input span for all occurrences of a regular expression and returns aRegex.ValueSplitEnumerator to iterate over the splits around matches.
public: static System::Text::RegularExpressions::Regex::ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input, System::String ^ pattern, System::Text::RegularExpressions::RegexOptions options, TimeSpan matchTimeout);public static System.Text.RegularExpressions.Regex.ValueSplitEnumerator EnumerateSplits(ReadOnlySpan<char> input, string pattern, System.Text.RegularExpressions.RegexOptions options, TimeSpan matchTimeout);static member EnumerateSplits : ReadOnlySpan<char> * string * System.Text.RegularExpressions.RegexOptions * TimeSpan -> System.Text.RegularExpressions.Regex.ValueSplitEnumeratorPublic Shared Function EnumerateSplits (input As ReadOnlySpan(Of Char), pattern As String, options As RegexOptions, matchTimeout As TimeSpan) As Regex.ValueSplitEnumeratorThe span to search for a match.
The regular expression pattern to match.
A bitwise combination of the enumeration values that specify options for matching.
A time-out interval, orInfiniteMatchTimeout to indicate that the method should not time out.
ARegex.ValueSplitEnumerator to iterate over the splits around matches.
pattern isnull.
options is not a valid bitwise combination of RegexOptions values, ormatchTimeout is negative, zero, or greater than approximately 24 days.
A regular expression parsing error occurred.
The behavior ofEnumerateSplits(ReadOnlySpan<Char>, String, RegexOptions, TimeSpan) is similar to the behavior ofSplit(String, String, RegexOptions, TimeSpan), producing the splits one at a time as part of iterating through the resulting enumerator rather than all at once as part of a single array. However, there are a few notable differences.Split(String, String, RegexOptions, TimeSpan) will include the contents of capture groups in the resulting splits, whileEnumerateSplits(ReadOnlySpan<Char>, String, RegexOptions, TimeSpan) will not. And ifRightToLeft is specified,Split(String, String, RegexOptions, TimeSpan) will reverse the order of the resulting splits to be left-to-right, whereasEnumerateSplits(ReadOnlySpan<Char>, String, RegexOptions, TimeSpan) will yield the splits in the order they're found right-to-left.
Each match won't actually happen untilMoveNext() is invoked on the enumerator, with one match being performed perMoveNext() call. Since the evaluation of the match happens lazily, any changes to the passed in input in between calls toMoveNext() may affect the match results; such changes should be avoided and are not supported.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?