Jump to content

extract substrings based on expression ?


 Share

Recommended Posts

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.

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

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