Solved

Split and seperate string ASP

Posted on 2011-09-09
2
213 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

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/…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 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

19 Experts available now in Live!

Get 1:1 Help Now