Regex results to string[]
I'm looking to populate a string array with the results from a regex query on a lump of text ( html)
I'm not familar with how regex works and I'm finding it confusing the difference between match and matches and why I use the results to directly or indirectly ( loop) drop data into a array
Re: Regex results to string[]
Re: Regex results to string[]
Normally if you parse a Regular expression the results can be get in many ways. One of them is the MatchCollection
Quote:
Represents the set of successful matches found by iteratively applying a regular expression pattern to the input string.
And the Match is the Individual match in the Match Collection.
MSDN
Re: Regex results to string[]
Here's another MSDN page with a C# example.
If you use the Match Collection like suggested by danasegarane you might not event need the String array you mere mentionning.