Dim TestList() As String = Array As String( _
"content://com.android.externalstorage.documents/document/primary%3ADownload%2Fmy.ged", _
"https://redlightcemetery.com/RedLightCemeteryQuokka%2Fjpeg", _
"https://live.staticflickr.com/5490/9079273886_2006eb1731_z.jpg", _
"file_name_with_no_extension" _
)
For Each uri As String In TestList
For Each Separator As String In Array As String("%2F", ".")
Dim P As Int = uri.ToUpperCase.LastIndexOf(Separator)
If P >= 0 Then Exit
Next
If P < 0 Then
Dim fname As String = uri
Dim fextension As String = ""
Else
Dim fname As String = uri.SubString2(0, P)
Dim fextension As String = uri.SubString(P + Separator.Length)
End If
Log("------------------------------")
Log("uri" & TAB & uri)
Log("nam" & TAB & fname)
Log("ext" & TAB & fextension)
Next