Hello,
I'm lost again....(as always )
I tried different approaches, _StringBetween, StringRegExp, StringInStr.... but in the end non of my approaches worked fine. Every time I ended up like this:
As I don't want to confuse you with my now messed up code snippets, I will explain what I got and what I need (sorry for that, but I don't want someone to fix my wrong approach if there is a already working solution (btw. of course I read the forum for some hints, and there are a lot of them but non of the described hints worked for me in the end. Maybe I'm not smart enough these days to understand.....(please don't say yes here)))
So here we go:
My Input string is:
this means I got three "fields" with the pattern:
"<prefix always 2char-2char with quotes>":{<value1 with data1 in quotes>,<value1 with data1 in quotes>}
separated by a " , ", surrounded by a "{}" pair.
I want to retrieve an array like this:
optional also with the start and end position of that string based on the original string in the same array.
eg: $arrTemp[1][0]="a1-a1":{"d1":"v1","d2":"v2"}
$arrTemp[1][1]=3
$arrTemp[1][2]=31
I "guess" this could be achieved by a StringRegExp formatted command. I wanted to define a pattern that split up the string into fields.
Could some one help me out?
I'm lost again....(as always )
I tried different approaches, _StringBetween, StringRegExp, StringInStr.... but in the end non of my approaches worked fine. Every time I ended up like this:
As I don't want to confuse you with my now messed up code snippets, I will explain what I got and what I need (sorry for that, but I don't want someone to fix my wrong approach if there is a already working solution (btw. of course I read the forum for some hints, and there are a lot of them but non of the described hints worked for me in the end. Maybe I'm not smart enough these days to understand.....(please don't say yes here)))
So here we go:
My Input string is:
[ autoit ]
$sString='{"a1-a1":{"d1":"v1","d2":"v2"},"b1-b1":{"d3":"v3","d4":"v4"},"c1-c1":{"d5":"v5","d6":"v6"}}'
"<prefix always 2char-2char with quotes>":{<value1 with data1 in quotes>,<value1 with data1 in quotes>}
separated by a " , ", surrounded by a "{}" pair.
I want to retrieve an array like this:
[ autoit ]
$arrTemp[1]="a1-a1":{"d1":"v1","d2":"v2"} $arrTemp[2]="b1-b1":{"d3":"v3","d4":"v4"} $arrTemp[3]="c1-c1":{"d5":"v5","d6":"v6"}
optional also with the start and end position of that string based on the original string in the same array.
eg: $arrTemp[1][0]="a1-a1":{"d1":"v1","d2":"v2"}
$arrTemp[1][1]=3
$arrTemp[1][2]=31
I "guess" this could be achieved by a StringRegExp formatted command. I wanted to define a pattern that split up the string into fields.
Could some one help me out?