Link to home
Start Free TrialLog in
Avatar of andieje
andieje

asked on

help needed with string manipulation

Hi

I was wondering if you could show me how to do the following.

I have a string which is a series of variable = value pairs. Each set is separated by a semi colnn. Some of the values can themselves be a comma separated list.

Eg:
name=andrea;email=andrea@world.com;roles=admin,superuser;

I need to split this input. I would ideally like the result to be in a hashtable or soemthing where the key is the variable name. In the case of the roles variable, i would like the different roles to be stored in an arraylist. Could i store an array list as the value in a hashtable?

In this example, the hastable would contain the following:

key      value
name   andrea
email   andrea@world.com
roles    arraylist = (admin,superuser)

How would i go about doing this? I am awful with string manipulation in vb.net

Thanks very much
andrea
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Good way Kemo Sabe.

Bob
You crack me up Bob...  =)

Read the "Lone Ranger Lore" at Wiki:
http://en.wikipedia.org/wiki/The_Lone_Ranger
I love the one from Gary Larson, with The Lone Ranger looking up Kemo Sabe in a dictionary and finding that it means, "an Apache expression for a horse's rear end."

Bob
Avatar of andieje
andieje

ASKER

Thanks very much!