Hi Chand,
Check this example. Now please take its reference and correct your code.
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
string str = "i have String \"Key \"L\" work On Wed, Apr 11, 2018 at 11:07 AM, <ithelpdesk2571997@gmail.com> wrote: > Update By-->Chandni, > Description-->Key \"L\" and \"M\" not work, > Allocate To-->Chandni, > Status-->open. > > ";
int index = str.IndexOf(" On");
string result = str.Substring(0, index);
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim str As String = "i have String ""Key ""L"" work On Wed, Apr 11, 2018 at 11:07 AM, <ithelpdesk2571997@gmail.com> wrote: > Update By-->Chandni, > Description-->Key ""L"" and ""M"" not work, > Allocate To-->Chandni, > Status-->open. > > "
Dim index As Integer = str.IndexOf(" On")
Dim result As String = str.Substring(0, index)
End Sub
Screenshot
