Hi,
I have this string; 108-306-204..
How can I get:
a = 108
b = 306
c = 204
??
I have this string; 108-306-204..
How can I get:
a = 108
b = 306
c = 204
??
Here it is:
B4X:Dim strBeforeSplit As String strBeforeSplit="108-306-204" Dim strSplit() As String strSplit=Regex.Split("-",strBeforeSplit) Msgbox(strSplit(0) & " " & strSplit(1) & " " & strSplit(2),"") 'returns: 108 306 204
Dim Valore As String
Dim strSplit() As String
Value = "6-03/12/2012-test" '<--------------
strSplit=Regex.Split("-",Value )
Msgbox(strSplit(0) & " " & strSplit(1) & " " & strSplit(2),"")
Dim Valore As String
Dim strSplit() As String
Value = "6|03/12/2012|test" '<--------------
strSplit=Regex.Split("|",Value )
Msgbox(strSplit(0) & " " & strSplit(1) & " " & strSplit(2),"")
Yes, the "|" is a metacharacter and it has to be escaped like this: "\|".
strSplit=Regex.Split("\|",Value )