I have one String , Which contain Word more Than one time ..
I want to find Each occurrence of that word one by one and need To add some other word after That ..
Example –
<start>
<child1>
.
.
.
<start>
<child2>
..
and So On ..
i tried .
int count = Regex.Matches(StrRemoveWrongData, @"<start>").Count;
its giving me count , there is any thing where we can go to every occurrence one by one .
and add new word below that ..
According to your title, to get all the index;
If your replacement algorightm is more complex than a simple then string you can use the overload of Regex.Replace