Jump to content

PHP Like Array string parsing


Syn Enyo
 Share

You are about to reply to a thread that has been inactive for 4328 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I have a string

size=<1,1,1>,color=<0.6, 0.2, 1.0>,alpha=hide

list values = llParseString2List(llList2String(strmsg,3),[","],[]);
integer i;
for(i = 0; i < (values!=[]);i++)
{
	llSay(0,llList2String(values,i));
}

 I get the following output

 

[14:54:05]  object: size=<1
[14:54:05]  object: 1
[14:54:05]  object: 1>
[14:56:35]  object: size=<1
[14:56:36]  object: 1
[14:56:36]  object: 1>
[14:56:36]  object: color=<0.6
[14:56:36]  object:  0.2
[14:56:36]  object:  1.0>
[14:56:36]  object: alpha=hide

 I want to get  size=<1,1,1> and color=<0.6, 0.2, 1.0> and alpha=hide

key=value,key=value,key=value,key=value Can be any amount of pairs. So not sure how i can get it to ingore the comas in the side of < and >

Any ideas?

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4328 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...