M
Mike Jansen
In .NET Framework 1.1 Visual Studio .NET 2003, System.Text.RegularExpression
namespace, I'm attempting to enumerate the Group Names from a Match.Groups.
For example:
Regex ex = new Regex("blah blah (?<group1>blah blah)");
Match match = ex.Match("input");
if (match.Success)
{
foreach (string groupName in match.Groups.??EnumeratorForGroupNames??)
{
// process the group
}
}
I need the group name because I want to move all groups into a Hashtable to
be passed to the generic handler. I don't want to maintain the regular
expression and a list of groups. I will if I have to but thought the info
should already be present in the GroupCollection but it doesn't seem to be
accessible.
Thanks,
Mike
namespace, I'm attempting to enumerate the Group Names from a Match.Groups.
For example:
Regex ex = new Regex("blah blah (?<group1>blah blah)");
Match match = ex.Match("input");
if (match.Success)
{
foreach (string groupName in match.Groups.??EnumeratorForGroupNames??)
{
// process the group
}
}
I need the group name because I want to move all groups into a Hashtable to
be passed to the generic handler. I don't want to maintain the regular
expression and a list of groups. I will if I have to but thought the info
should already be present in the GroupCollection but it doesn't seem to be
accessible.
Thanks,
Mike