B b4AMarkO Member Licensed User Longtime User May 13, 2013 #1 Can this be done in B4A? If so How do you do it? I seem to recall that in a RTB in vb you could do it something like this B4X: For Each line in RTB1.Lines If line.Contains("Apple" Then ' Do what you need to do here End If Next So can I do something like this to an EditText?
Can this be done in B4A? If so How do you do it? I seem to recall that in a RTB in vb you could do it something like this B4X: For Each line in RTB1.Lines If line.Contains("Apple" Then ' Do what you need to do here End If Next So can I do something like this to an EditText?
stevel05 Expert Licensed User Longtime User May 13, 2013 #2 Not directly but you can split the text to an array using Regex and the iterate over the array: B4X: Dim TextArray() As String TextArray = Regex.Split(CRLF,EditText1.Text) For Each Line As String In TextArray Log(Line) Next Upvote 0
Not directly but you can split the text to an array using Regex and the iterate over the array: B4X: Dim TextArray() As String TextArray = Regex.Split(CRLF,EditText1.Text) For Each Line As String In TextArray Log(Line) Next
B b4AMarkO Member Licensed User Longtime User May 14, 2013 #3 stevel05 said: Not directly but you can split the text to an array using Regex and the iterate over the array: B4X: Dim TextArray() As String TextArray = Regex.Split(CRLF,EditText1.Text) For Each Line As String In TextArray Log(Line) Next Click to expand... Yes that will getter done .. Thank you very much Upvote 0
stevel05 said: Not directly but you can split the text to an array using Regex and the iterate over the array: B4X: Dim TextArray() As String TextArray = Regex.Split(CRLF,EditText1.Text) For Each Line As String In TextArray Log(Line) Next Click to expand... Yes that will getter done .. Thank you very much