Solved

Split and seperate string ASP

Posted on 2011-09-09
2
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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/…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

726 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