• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

Split and seperate string ASP

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
Upperdecker
Asked:
Upperdecker
1 Solution
 
G_HCommented:
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
 
UpperdeckerAuthor Commented:
Yes, yes! Your awesome!

Thanks
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now