0

I have a String like this:

Info1|Info2

I want this String to be splitted by | and a it should return the second Info and the first one. So I want one msgbox displaying Info1 and another one displaying Info2. How can I do this? I already tried

StringSplit

But without any success...

1
  • Related. Commented Mar 11, 2019 at 13:27

1 Answer 1

2

Try this :

#Region    ;************ Includes ************
#Include <Array.au3>
#EndRegion ;************ Includes ************
$str = 'Info1|Info2'
$array = StringSplit($str, '|', 2)
For $i = 0 To UBound($array) - 1
    MsgBox(64, $i, $array[$i], 1)
Next
_ArrayDisplay($array) ; example
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.