'make sure not to add whitespace to the string.
Dim s As String = $"2.10
2.1
2.2
2.3"$
Dim sorted As B4XOrderedMap = B4XCollections.CreateOrderedMap
For Each line As String In Regex.Split("[\r\n+]", s)
Dim m As Matcher = Regex.Matcher("(\d+)\.(\d+)", line)
If m.Find Then
sorted.Put(m.Group(1) + m.Group(2) / 1000, line)
End If
Next
sorted.Keys.Sort(True)
For Each key As Object In sorted.Keys
Log(sorted.Get(key))
Next
You should of course use the values from File.ListFiles instead of s.