A astf Member Licensed User Longtime User Mar 15, 2012 #1 Hi everyone... I have a string with de value: string1 = 3,251,54,874,521,2548, each number for this string is a register in one table, total of 6 registers in this string.... i need break the string... how can i separate the values...? i need update a register in a sqlite table for each value in this string...
Hi everyone... I have a string with de value: string1 = 3,251,54,874,521,2548, each number for this string is a register in one table, total of 6 registers in this string.... i need break the string... how can i separate the values...? i need update a register in a sqlite table for each value in this string...
D DouglasNYoung Active Member Licensed User Longtime User Mar 15, 2012 #2 astf, Hve a look at regex.split -> http://www.b4x.com/android/help/regularexpressions.html#regex_split`or use the search function - its exactly what you're looking for. Cheers, Douglas Upvote 0
astf, Hve a look at regex.split -> http://www.b4x.com/android/help/regularexpressions.html#regex_split`or use the search function - its exactly what you're looking for. Cheers, Douglas
A astf Member Licensed User Longtime User Mar 15, 2012 #3 thx... Douglas, that is exactly what i want... but how can i count the strings? for each value in the string i need to do a update in a sqlite table... for value = 3 query = "Update ........ Where id = 3 " for value = 251 query = "Update ........ Where id = 251 " i need a update for every value.... Last edited: Mar 15, 2012 Upvote 0
thx... Douglas, that is exactly what i want... but how can i count the strings? for each value in the string i need to do a update in a sqlite table... for value = 3 query = "Update ........ Where id = 3 " for value = 251 query = "Update ........ Where id = 251 " i need a update for every value....
K kickaha Well-Known Member Licensed User Longtime User Mar 15, 2012 #4 Code: Dim String1 As String string1 = "3,251,54,874,521,2548" Dim StringValues() As String StringValues = Regex.Split(",", String1) For count = 0 to StringValues.Length -1 ' do what you need with each StringValues(count) Next Upvote 0
Code: Dim String1 As String string1 = "3,251,54,874,521,2548" Dim StringValues() As String StringValues = Regex.Split(",", String1) For count = 0 to StringValues.Length -1 ' do what you need with each StringValues(count) Next