M MathiasM Active Member Licensed User Dec 27, 2020 #1 Hello When I try this simple line in an app, it crashes with an out of bounds exception. Is this a bug, or am I something not seeing here? B4X: Log(Regex.Split(".", "Test.exe")(0)) Expected behaviour: A log that shows Test, as I splitted the string on the . And showed the first (0) element of the array. Thanks, sorry if I said something stupid.
Hello When I try this simple line in an app, it crashes with an out of bounds exception. Is this a bug, or am I something not seeing here? B4X: Log(Regex.Split(".", "Test.exe")(0)) Expected behaviour: A log that shows Test, as I splitted the string on the . And showed the first (0) element of the array. Thanks, sorry if I said something stupid.
M MathiasM Active Member Licensed User Dec 27, 2020 #2 Nevermind, I forgot to escape my . This works perfectly: B4X: Log(Regex.Split("\.", "Test.exe")(0))