Parse Script

H

HartSA

I don't even know where to start with this. I am new to ASP. I have this
string

SRSW1023;2UA4;HP;786B2;cv492;

I would like to see four separate strings
CN = SRSW1023
SN = 2UA4
Model = HP
BIOS = 786B2
User = cv492

Lengths will vary on each record, but " ; " is the common delimiter
 
S

Steven Burn

TheString = "SRSW1023;2UA4;HP;786B2;cv492;"
sTemp = Split(TheString, ";")
For x = LBound(sTemp) To UBound(sTemp)
Response.Write sTemp & "<br>"
Next

or to be more precise

TheString = "SRSW1023;2UA4;HP;786B2;cv492;"
sTemp = Split(TheString, ";")
CN = sTemp(0)
SN = sTemp(1)
Model = sTemp(2)
BIOS = sTemp(3)
User = sTemp(4)

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top