newbie27
asked on
VB.NET STRING FUCNTION
Hello Experts
I am getting a data from the database column in the following format, I am trying to retrieve the last word after ":"
Sometimes I may get 3 strings concatenated with colon or sometimes 4, regardless of this I want to get the last name
POSelID: p502<br>Ice Creams:Neapolitan
POSelID: p564:o26:6m<br>Film Quote Babygrow - The Force is Strong in This One:6m
POSelID: p502<br>Ice Creams:TestOption
Please can someone let me know how can I get the exact value after retrieving it from the DB column,
AttributeName = UCase(row.Item("options"))
ex: AttributeName = Neapolitan
Thanks
I am getting a data from the database column in the following format, I am trying to retrieve the last word after ":"
Sometimes I may get 3 strings concatenated with colon or sometimes 4, regardless of this I want to get the last name
POSelID: p502<br>Ice Creams:Neapolitan
POSelID: p564:o26:6m<br>Film Quote Babygrow - The Force is Strong in This One:6m
POSelID: p502<br>Ice Creams:TestOption
Please can someone let me know how can I get the exact value after retrieving it from the DB column,
AttributeName = UCase(row.Item("options"))
ex: AttributeName = Neapolitan
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim _lstTemp As List(Of String) = "POSelID: p502<br>Ice Creams:Neapolitan".Split("
Dim _lastName As String = _lstTemp(_lstTemp.Count - 1)