Jump to content
SoyArcano

how to split string using autoit?

Recommended Posts

SoyArcano

i will have one input, in this input i will write a string with some delimiters like hello@this@isanexample

but i'm not sure how to separate them ?

Edited by SoyArcano

Share this post


Link to post
Share on other sites
mikell

StringSplit ?

Share this post


Link to post
Share on other sites
algiuxas

Hello!

This is really easy using "StringSplit" function!

Example:

$text = "abc 123@test@test abc"
$split = StringSplit($text,"@")
For $i = 1 to $split[0]
   Consolewrite("$split["&$i&"] = "&$split[$i]&@CRLF)
Next

; I will kill Android keyboard... It doesn't want to write spaces and other stuff...

$split is an array, $split[0] says how many strings are in this array.

Edited by algiuxas

42783.png

Share this post


Link to post
Share on other sites

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

×