Bug? Regex.Split

Dey

Active Member
Licensed User
Longtime User
B4A 5.8
Salve a tutti
come mai questa funzione non va?
dove sbaglio?

Hello everyone
why this function should not be?
where am I wrong?
B4X:
Dim Pass2() As String               
Pass2=Regex.Split(".","1111.1963")
 

DonManfred

Expert
Licensed User
Longtime User
"." is a special char and need to be escaped.

B4X:
    Dim Pass2() As String             
    Pass2=Regex.Split("\.","1111.1963")
    Log("PassSize="&Pass2.Length)
    For i = 0 To Pass2.Length-1
        Log($"Pass ${Pass2(i)}"$)
    Next
 

Dey

Active Member
Licensed User
Longtime User
"." is a special char and need to be escaped.

B4X:
    Dim Pass2() As String           
    Pass2=Regex.Split("\.","1111.1963")
    Log("PassSize="&Pass2.Length)
    For i = 0 To Pass2.Length-1
        Log($"Pass ${Pass2(i)}"$)
    Next


thanks solved
 
Top