B4X:
Dim components() As String
components = Regex.Split("", "1234")
B4A: 5 strings - "" "1" "2" "3" "4"
B4J: 4 strings - "1" "2" "3" "4"
https://www.b4x.com/android/forum/threads/regex-split.157791/
Dim components() As String
components = Regex.Split("", "1234")
You never quit Mario. I quickly tested and it shows 4 elements in B4AB4A: 5 strings - "" "1" "2" "3" "4"
Dim components() As String
components = Regex.Split("", "1234")
Log(components.Length)
For i =0 To components.Length-1
Log(components(i))
Next
That's exactly what I was writing:Where Regex come from?
Is it included in Java JDK?
Could it be something related to the Java version?
@LucaMs which version of Java do you have in your path?
I tested with Open JDK 14 and 17.
Is it possible that even when I compile with jdk 14 javac.exe other jdk 8 files are used? But if that were the case, why doesn't the same thing happen with B4J?Just now I created a new "default" project, compiled with jdk 14.0.1 (javac.exe, of course?): 5 strings!
Yes, Android 8, but the question was asked by another Italian member, who most likely has a more recent Android.Are you doing this on a real device? What Android version?