Splitting *string*

Results 1 to 5 of 5

Thread: Splitting *string*

  1. #1
    Newby Guest

    Default Splitting *string*

    Guys - <BR>can you tell me how to spilt a string like "Newgif.gif" so that in one var I get "Newgif" and second variable in ".gif".<BR> <BR>Isn&#039;t it something to do with split.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Splitting *string*

    myvar = split("newgif.gif",".")<BR><BR>myvar[0] &#039;=newgif<BR>myvar[1] &#039;=gif

  3. #3
    RobT Guest

    Default RE: Splitting *string*

    myVar = "Newgif.gif"<BR>myVar2 = split(myVar,".")<BR><BR>response.write myVar2(0) & " " & myVar2(1)

  4. #4
    NewBy Guest

    Default RE: Splitting *string*

    ManyThanks for the quick response

  5. #5
    Thomas Fuller Guest

    Default RE: Splitting *string*

    It&#039;s really easy to use client side javascript but you may not be able to do that in this case, if you can do the follwing:<BR><BR>strTest = "newgif.gif"<BR><BR>aryTest = strTest.split(".")<BR><BR>RESULTS:<BR>aryTest[0] = newgif<BR>aryTest[1] = gif

Posting Permissions

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