string str="sdfsdafdgfdgahgyt3ads";
Regex reg=new Regex("a");
str=reg.Replace(str,"6",1,str.IndexOf("a")+1);
str=reg.Replace(str,"5",1,str.IndexOf("a")+1);
Regex reg=new Regex("a");
str=reg.Replace(str,"6",1,str.IndexOf("a")+1);
str=reg.Replace(str,"5",1,str.IndexOf("a")+1);
int i = 0;
string sqs =new string( ss.Select(item =>
{ if (item == 'r')
{
i++;
if (i == 2)
{
item = 'E';
}
else if(i==3)
{
item='p';
}
}
return item;
}).ToArray());