I have two strings

```
 str1 = "E|DaphneBlake" 
 str2 = "8/27/2015" 

```

which are concatenated to one. 

```
 string str3 = String.Concat(str1,str2)

```

This produces an Output: 

```
 "E|DaphneBlake8/27/2015"

```

Later, I am trying to retrieve the two strings back into two var.
I am using this code to do so:

```
public static string getFirst(string strSource, string strStart, string strEnd)
{
int Start, End;
if (strSource.Contains(strStart) && strSource.Contains(strEnd))
{
    Start = strSource.IndexOf(strStart);
    End = strSource.IndexOf(strEnd);
    return strSource.Substring(Start, End);
}
else
{
    return "";
}
}

public static string getLast(string strSource, string strStart)
{
int Start, End;
if (strSource.Contains(strStart))
{
    Start = strSource.IndexOf(strStart);
    End = strSource.LastIndexOf(strStart) + 1;
    return strSource.Substring(Start, End);
}
else
{
    return "";
}
}

string data = getFirst("E|DaphneBlake8/27/2015", "E|Daphne Blake8", "8/27/2015");
string data2 = getLast("E|DaphneBlake8/27/2015", "8/27/2015");

```

The getFirst works but the **getLast does not**. It gives me an error

```
Index and length must refer to a location within the string.Parameter name: length

```