private string delstr(string theoldstr,string startstr,string endstr)
{
string teststr=theoldstr;
int StartPosition=teststr.IndexOf(startstr);
int EndPosition=teststr.IndexOf(endstr);
int DelLength=EndPosition-StartPosition+endstr.Length;
teststr=teststr.Remove(StartPosition,DelLength);
if(teststr.IndexOf(startstr)>=0 && teststr.IndexOf(endstr)>=0)
{
return delstr(teststr,startstr,endstr);
}
else
{
return teststr;
}
}
{
string teststr=theoldstr;
int StartPosition=teststr.IndexOf(startstr);
int EndPosition=teststr.IndexOf(endstr);
int DelLength=EndPosition-StartPosition+endstr.Length;
teststr=teststr.Remove(StartPosition,DelLength);
if(teststr.IndexOf(startstr)>=0 && teststr.IndexOf(endstr)>=0)
{
return delstr(teststr,startstr,endstr);
}
else
{
return teststr;
}
}