I have strings that all have different lengths. e.g.
str1 = "This is new job ----First Message----- This is reopened ";
str2 = "Start Process ----First Message----- Is this process closed? <br/> no ----First Message-----";
Now these string shall always have the "----First Message-----"
in it.
What I need is to trim or split the string in such a way that I only get the part left of the FIRST TIME the "----First Message-----"
occurs.
So in case of str1
result should be "This is new job "
For str2
it should be "Start Process "
How can this be done in C#?