Hi,
How can I get all the matches in the following example:
// Only "abcd" is matched
MatchCollection greedyMatches = Regex.Matches("abcd", @"ab.*");
// Only "ab" is matched
MatchCollection lazyMatches = Regex.Matches("abcd", @"ab.*?");
// How can I get all matches: "ab", "abc", "abcd"
Thanks.
Peter
P.S.: I want to have the all matches in a generic manner. The example above is just an example. :-)