Android Question Regex.Split

DonManfred

Expert
Licensed User
Longtime User
Do you want to split on these three chars???
Or do you want to split at a dot?

To use dot you need to escape it.
B4X:
Dim data As String
data = "123.432.13.4.12534"
Dim numbers() As String
numbers = Regex.Split("\.", data)
Dim l As List
l.Initialize2(numbers)
Log(l)
 
Last edited:
Upvote 0

RandomCoder

Well-Known Member
Licensed User
Longtime User
No it's not a bug. Special characters must be escaped using a backslash before they can be used in an expression. The "." dot has a special meaning when not escaped, it matches any character except line breaks.
 
Upvote 0
Top