Reputation: 1559
I am working on finishing up a mvc 3 vb.net app... I have to parse about 2000 entries in a database and get the string value to the right of a " : " delimiter from one of the columns... Everything to the left I am not worried about but I need the value that is to the right of the colon for that item.. I have more issues involving needing to select string characters to the right or left of a delimiter... But if someone can show me how to achieve the above I can figure out the rest from there... Thanks again...
a example of the string is Jackson Smokehouse Fish Food:John Jacob JinggleHimer Schmit I would want to eliminate the first part of the string or just select the second part and put it in a variable for later processing...
Upvotes: 0
Views: 659
Reputation: 3372
You could use string.Split(':') which will split your string into a string array. so you can just grab the string to the right. My VB is rusty:
Dim stringToRight as String
stringToRight = databaseString.Split("1"c)(1)
There are probably better ways, but this is straight forward.
Upvotes: 1