Hi,
I'm facing a performance issue with the following code:
MatchCollection match = regex.Matches(strInput);
int i = match.Count; //This line is consuming 98% of CPU time
for(int j =0;j<i;j++)
{
....
....
}
I also tried the following alternative to avoid match.Count
for (match = regex.Match(strInput); match.Success; match = match.NextMatch())
{
...
...
}
This also doesn't make any difference. It would be great if anyone could give me an alternate solution.
Thanks & Regards,
Frenz