Jump to content

How can I use _StringExplode() to split a line break character


Go to solution Solved by Andreik,

Recommended Posts

Posted

I get the following result in a variable

Quote

$buf_collect=echo $?
0
]0;root@ivgl9:~[root@ivgl9 ~]#

how do I split this up so I get each string a separate array element using _StringExplode()

Posted (edited)

in real console (I use VS Code) I have a problem

that i got 

723a0-clip-57kb.png?nocache=1

I want to get a zero, which in the screenshot is shown on a separate line (this is the result of the command echo $? in the console) but as you can see a bunch of extra characters are written to the array, although there are none in the autoit console

 

in a regular console (not autoit) this command looks like this

3d9d8-clip-5kb.png?nocache=1

Edited by nill
Posted (edited)

What do you mean by each string? Give us exactly the text that you have in AutoIt variable and what part are you interested to get.

Edited by Andreik
Posted
29 minutes ago, Andreik said:

What do you mean by each string? Give us exactly the text that you have in AutoIt variable and what part are you interested to get.

I mean each line

I cant copy exactly what I have in VS Console I showed it on the screenshot above, when I copy I got this

Quote

echo $?
[?2004l
0
[?2004hroot@2aa7e32f703e:/# 

And I intresting to get line where I have 0 (zero)

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...