Text_NameAndAddress=“Date -1/12/2019 \r\nTom Hanks \r\n789 Broad Street \r\nPeoria, IL 61615 \r\n”
I want to split my data with ‘\r\n’ by using below syntax.
Text_NameAndAddress.Split({vbCr,vbLf},StringSplitOptions.None)
I am getting data in the below format but why i am getting extra “” quotes how to
string[9]
{
"Date -1/12/2019 ",
“”,
"Tom Hanks ",
“”,
"789 Broad Street ",
“”,
"Peoria,
IL 61615 ",
“”,
“”
}
This is due to using vbCr and vbLf seperately, it is using both characters to split the text on. Instead split using a \r\n or use vbCrLf to split only once per instance.