I have a string in the application, the strings contents are "value1 | value2".
I've been using this code to split it using spaces and to the 2nd so I get value 2 (that may have been worded weird sorry):
The problem with this is, I've realized most of the value2 values will have multiple spaces and things for that side of the value. How should I go about getting the right sides contents even with multiple spaces?Code:Dim sString As String = "value1 | value2" Dim split As String = sString.Split(" ")(2)
Edit: Fixed I just used sString.Split("|")(1)




Reply With Quote
