Sign in to follow this  
Followers 0
Undutchable

extract substrings based on expression ?

3 posts in this topic

Hi guys :)

Can anyone post an example of how to do this?

$StringX = '{"aaa","bbb","ccc","ddd"}'

How do I fill an array with the strings inside the double quotes of $StringX.

Like this:

$arrayX[1] = "aaa"

$arrayX[2] = "bbb"

$arrayX[3] = "ccc" . .and so on

The pattern seem to be the double quotes.. all characters enclosed in the double quotes..

but how?? >_<

Thanks.

Share this post


Link to post
Share on other sites



Hi guys :)

Can anyone post an example of how to do this?

$StringX = '{"aaa","bbb","ccc","ddd"}'

How do I fill an array with the strings inside the double quotes of $StringX.

Like this:

$arrayX[1] = "aaa"

$arrayX[2] = "bbb"

$arrayX[3] = "ccc" . .and so on

The pattern seem to be the double quotes.. all characters enclosed in the double quotes..

but how?? >_<

Thanks.

Try this:

#Include <String.au3>
$StringX = '{"aaa","bbb","ccc","ddd"}'
$ArrayX = _StringBetween($StringX,'"','"')

When the words fail... music speaks

Share this post


Link to post
Share on other sites

man, i feel like a newbie... :)

Thanks Andreik

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
Sign in to follow this  
Followers 0