Thank you for your response.
I know this can be done for example:
B4X:
dim a,b,c as string
Dim data As String
data = "aaa.bbb.ccc
Dim numbers() As String
numbers = Regex.Split("\.", data)
Dim l As List
l.Initialize2(numbers)
a=l.Get(0)
b=l.Get(1)
c=l.Get(2)
it divides the string into parts but I would like to assign them to variables a, b, c
B4X:
dim a,b,c as string
dim str as string= "aaa.bbb.ccc''
Dim rx As RegexBuilder
For Each s As String In Regex.Split(rx.Initialize.AppendEscaped(".").Pattern, str )
Log(s)
Next
The purpose of RegexBuilder is to help you build the pattern. Once you got the pattern you use the regular Regex methods.
B4X:
Dim a,b,c As String
Dim data As String = "aaa.bbb.ccc"
Dim builder As RegexBuilder
Dim numbers() As String = Regex.Split(builder.Initialize.AppendEscaped(".").Pattern, data)
Dim l As List
l.Initialize2(numbers)
a=l.Get(0)
b=l.Get(1)
c=l.Get(2)
Dim a,b,c AsString Dim data AsString = "aaa.bbb.ccc" Dim builder As RegexBuilder Dim numbers() AsString = Regex.Split(builder.Initialize.AppendEscaped(".").Pattern, data) Dim l AsList l.Initialize2(numbers)
a=l.Get(0)
b=l.Get(1)
c=l.Get(2)