C CD Tom Member Licensed User Longtime User Jan 8, 2013 #1 This probably is very simple but I'm not sure how to do it in b4a. I have a variable with the following information in it tom,cd,1220 what I want to do is get the tom in a variable, cd in another variable and 1220 in another variable. what the easiest way of doing this. Thanks for any help.
This probably is very simple but I'm not sure how to do it in b4a. I have a variable with the following information in it tom,cd,1220 what I want to do is get the tom in a variable, cd in another variable and 1220 in another variable. what the easiest way of doing this. Thanks for any help.
M Mahares Expert Licensed User Longtime User Jan 8, 2013 #2 Tom: Use the RegEx function. Here it is: Code: Copy Dim MyVar() As String Dim MyStr As String= "tom,cd,1220" MyVar=Regex.Split(",",MyStr) Msgbox(MyVar(0) & CRLF & MyVar(1) & CRLF & MyVar(2),"") Upvote 0
Tom: Use the RegEx function. Here it is: Code: Copy Dim MyVar() As String Dim MyStr As String= "tom,cd,1220" MyVar=Regex.Split(",",MyStr) Msgbox(MyVar(0) & CRLF & MyVar(1) & CRLF & MyVar(2),"")