I achieved my solution in this way
string[] FinalArr = { };
if (RawAddedItems.Length > 1)
{
if (RawAddedItems.Contains("OrderPageRadios"))
{
int index = RawAddedItems.IndexOf("OrderPageRadios"),
secondindex = RawAddedItems.IndexOf("[", index) + 1,
LastIndex = RawAddedItems.IndexOf("]", index);
string NewDBString = RawAddedItems.Substring(secondindex, LastIndex - secondindex);
FinalArr = NewDBString.Split("|");
return FinalArr;
}
return FinalArr;
}
else
return FinalArr;
}
Any questions regarding the code can be answered :)