using System;
class Program
{
static void Main(string[] args)
{
string str = "Apples and Oranges and Bananas and Grapes are tasty";
string delimiter = "and";
// Split the string by the delimiter
string[] parts = str.Split(new string[] { delimiter }, StringSplitOptions.None);
foreach (string part in parts) {
Console.WriteLine(part.Trim());
}
}
}
/*
run:
Apples
Oranges
Bananas
Grapes are tasty
*/