Well if you know that invite code is first 19 characters and data is last eight characters the email is always the rest isn't it?
/*wrong*/
email = strcode.substring(19, (strcode.length-8))
no sorry it is:
/*correct*/
strcode.Substring(19, (strcode.Length - 27));
unit test here:
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
string strcode = "qwer-tyui-opas-dfghdineshkumardora@yahoo.com08032018";
var invitecode = strcode.Substring(0, 19);
var date = strcode.Substring((strcode.Length - 8), 8);
var email = strcode.Substring(19, (strcode.Length - 27));
Assert.AreEqual("qwer-tyui-opas-dfgh", invitecode);
Assert.AreEqual("dineshkumardora@yahoo.com", email);
Assert.AreEqual("08032018", date);
}
}