This sample code assumes that a single space is the delimiter between the two subparts of the string.
Dim strInput As String = "HD_PRS22_S_DL 33000"
Dim x As Integer = strInput.IndexOf(" ")
Console.WriteLine(strInput.Substring(0, x))
Console.WriteLine(strInput.Substring(x + 1))
This sample code assumes that a single Tab character is the delimiter between the two subparts of the string.
Dim strInput As String = "HD_PRS22_S_DL" & vbTab & "33000"
Dim x As Integer = strInput.IndexOf(vbTab)
Console.WriteLine(strInput.Substring(0, x))
Console.WriteLine(strInput.Substring(x + 1))
This sample code assumes that one or more spaces are the delimiter between the two subparts of the string.
Dim strInput As String = "HD_PRS22_S_DL" & SPACE(5) & "33000"
Dim x As Integer = strInput.IndexOf(" ")
Console.WriteLine(strInput.Substring(0, x).Trim)
Console.WriteLine(strInput.Substring(x + 1).Trim)
This sample code assumes that a Tab character is the delimiter but there could be one or more spaces between the two subparts of the string.
Dim strInput As String = "HD_PRS22_S_DL" & SPACE(2) & vbTab & SPACE(2) & "33000"
Dim x As Integer = strInput.IndexOf(vbTab)
Console.WriteLine(strInput.Substring(0, x).Trim)
Console.WriteLine(strInput.Substring(x + 1).Trim)