id like to do something like
foreach (Match match in regex)
{
MessageBox.Show(match.ToString());
}
Thanks for any help...!
See Question&Answers more detail:osid like to do something like
foreach (Match match in regex)
{
MessageBox.Show(match.ToString());
}
Thanks for any help...!
See Question&Answers more detail:osThere is a RegEx.Matches
method:
foreach (Match match in regex.Matches(myStringToMatch))
{
MessageBox.Show(match.Value);
}
To get the matched substring, use the Match.Value
property, as shown above.