Parse in VBScript???

Results 1 to 3 of 3

Thread: Parse in VBScript???

  1. #1
    Join Date
    Dec 1969

    Default Parse in VBScript???

    Anyone know a way to parse thru a string and then split it up accordingly?<BR><BR>For example:<BR><BR>strTest= "Id=400&FName=Joe&LName=Smith"<BR><BR>I need to split it up so that I have:<BR>Id=400<BR>FName=Joe<BR>LName=Smith<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Parse in VBScript???

    ArrayTest = split(strTest, "&") &#039creates array of elements delimited by the "&"<BR> <BR>Dim iLoop<BR>For iLoop = LBound(ArrayTest) to UBound(ArrayTest)<BR> ArrayTest(iLoop) = Trim(ArrayTest(iLoop)) &#039trims off spaces<BR>Next

  3. #3
    Sita Varanasi Guest

    Default RE: Parse in VBScript???

    Use the Split function in Vb<BR>arrstrTest = Split(strTest,"&")<BR>then the result would be<BR>arrstrTest(0) = Id=400<BR>arrstrTest(1) = Fname=Joe<BR>arrstrTest(2) = Lname=Smith.<BR><BR>Good luck<BR>SV

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts