string words = "xxx1-0.1/1 yyy,ccc1,1"; string[] split = words.Split(new Char[] { '-', ' ', ',' }); foreach (string s in split) { if (s.Trim() != "") Console.WriteLine(s); }
Dim s As String = "xxx1-0.1/1 yyy,ccc1,1" Dim ans = s.Split(New Char() {"-"c, " "c})(1) MessageBox.Show(ans)
Private Function getMySpecialValue(input As String) As String Return input.Split(New Char() {"-"c, " "c})(1) End Function
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)