It looks like your data is strings with lines like:
Url = Menu[0][0]=new mI("Home","http://aps.abcd.com/details/0,8590,CLI1_DIV152_ETI3140,00.html")
and
Menu[0][1]=new mI("Home","http://aps.abcd.com/details/0,8590,CLI1_DIV152_ETI3140,00.html")
and you want to extract the two index values used for
Menu
.
"0,0" and "0,1" respectively.
Going with that assumption:
List<string> data = new List<string>()
{
"Url = Menu[0][0]=new mI(\"Home\",\"http://aps.abcd.com/details/0,8590,CLI1_DIV152_ETI3140,00.html\")",
"Menu[0][1]=new mI(\"Home\",\"http://aps.abcd.com/details/0,8590,CLI1_DIV152_ETI3140,00.html\")"
};
Regex indexFinder = new Regex(@"Menu\[(\d+)\]\s*\[(\d+)\]");
foreach (string datum in data)
{
Match indexMatch = indexFinder.Match(datum);
if (indexMatch.Success)
{
Console.Writeline(index.Match.Groups[1].Value + "," + index.Match.Groups[2].Value);
}
}
Yes, I could have used a format string with the Console.Writeline() but the original request might need the two values as a single string for some other purpose. ;)