Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Parse Strings with VBScript

Posted on 1999-06-24
Medium Priority
Last Modified: 2013-12-25
I have "1, 3, 5, 15, 37" in a string called sIds.  How can I parse this string, using VBScript, to get the numbers out.  I can put them in an array and process them later or process them as they read them.
Thank you
Question by:akhaligh
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
1 Comment

Accepted Solution

mayhew earned 40 total points
ID: 1863499
You can use the split function to parse through the string and put the numbers into a string array.

It would look something like:

Dim MyString, MyArray
MyString = "1, 3, 5, 15, 37"
MyArray = Split(MyString, ", ")
' MyArray(0) = "1"
' MyArray(1) = "3"
' MyArray(2) = "5"
' MyArray(3) = "15"
' MyArray(4) = "37"

Let me know if that's what you're looking for.

Featured Post

Cloud Training Guides

FREE GUIDES: In-depth and hand-crafted Linux, AWS, OpenStack, DevOps, Azure, and Cloud training guides created by Linux Academy instructors and the community.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

670 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