Solved

Split and seperate string ASP

Posted on 2011-09-09
2
227 Views
Last Modified: 2012-05-12
All,
I have a string, say:   12345*Dave Smith , 4567*Bill Sims , 91234*John Doe

I need to separate the string into numbers and text so it can update two fields

fields 1: "Dave Smith,Bill Sims,John Doe"
 
fields 2 : "12345,4567,91234"

Thanks in Advance.
0
Comment
Question by:Upperdecker
2 Comments
 
LVL 11

Accepted Solution

by:
G_H earned 500 total points
ID: 36511730
Hi There,

Try something like this:

arrSections = Split(Input, ",")
for i = 0 to UBound(arrSections)
    arrBits = Split(arrSections(i), "*")
        Field1 = Field1  arrBits(1) & ","
        Field2 = Field2 & arrBits(0) & ","
next

Field1 = Left(Field1, len(Field1)-1)
Field2 = Left(Field2, len(Field2)-1)

GH
0
 

Author Closing Comment

by:Upperdecker
ID: 36511776
Yes, yes! Your awesome!

Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Table header not displaying on Firefox and Chrome 7 141
Out the count variables 6 53
API Location, separating out information 10 46
SMS AddAttachment Protocol Error Classic ASP 10 38
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now