I have a string: string1 string2 - string3 string4
. I need it split in two at the -
(note the space on either side of the "-"). I have the following code which isn't working as expected:
#include <MsgBoxConstants.au3>
#include <String.au3>
Local $test = _StringExplode("string1 string2 - string3 string4", " - ")
MsgBox($MB_SYSTEMMODAL, "Title", $test[1])
The output is string2
. I expected it to be string3 string4
.
Must be a small oversight but I'm having trouble finding it.