Text String Manipulation 
Author Message
 Text String Manipulation

Is there a way to say when the first comma come up do this, one the second
comma do this, and on the third comma do this? So that I can turn "650 town
center drive,box #2 park center-back dock,costa mesa, ca 92626" into
"<street>650 town center drive</street><location>box #2 park center-back
dock</location><city>costa mesa</city><state>ca</state> <zip>92626</zip>

Brian



Sun, 05 May 2002 03:00:00 GMT  
 Text String Manipulation

Super it worked!
Thanks
Another question??
for a given string "11201999"
Is there a way to say do this on the 2nd character and so on to produce "11-20-1999"?
Thanks!

    Brian,

    This can be put in a loop and the tags assigned to another array.

    <snip>

    Dim aAddress
    Dim sAddress
        sAddress = "650 town center drive,box #2 park center-back dock,costa mesa, ca 92626"
        aAddress = Split( sAddress )
        sAddress = "<street>" & aAddress(0) & "</street><location>>" & aAddress(1) &_
                         "</location><city>" & aAddress(2) & "</city><state>" & aAddress(3) &_
                         "</state> <zip>" & aAddress(4) & "</zip>"
    </snip>

    --
    Nic Roche
    Net Extra
    www.extra.net.au
    =================================================
    imagex - Web Imaging - activex thin client
    Button Creator, Thumbnail Creator, Imaging Lite, ImageMap Creator,
    MouseOver Creator, SlideShow Creator.
    Properties, Methods, Events, Software Developers Kit
    =================================================


    > Is there a way to say when the first comma come up do this, one the second
    > comma do this, and on the third comma do this? So that I can turn "650 town
    > center drive,box #2 park center-back dock,costa mesa, ca 92626" into
    > "<street>650 town center drive</street><location>box #2 park center-back
    > dock</location><city>costa mesa</city><state>ca</state> <zip>92626</zip>
    >
    > Brian
    >
    >



Mon, 06 May 2002 03:00:00 GMT  
 Text String Manipulation

Brian,

This can be put in a loop and the tags assigned to another array.

<snip>

Dim aAddress
Dim sAddress
    sAddress = "650 town center drive,box #2 park center-back dock,costa mesa, ca 92626"
    aAddress = Split( sAddress )
    sAddress = "<street>" & aAddress(0) & "</street><location>>" & aAddress(1) &_
                     "</location><city>" & aAddress(2) & "</city><state>" & aAddress(3) &_
                     "</state> <zip>" & aAddress(4) & "</zip>"
</snip>

--
Nic Roche
Net Extra
www.extra.net.au
=================================================
imagex - Web Imaging - activex thin client
Button Creator, Thumbnail Creator, Imaging Lite, ImageMap Creator,
MouseOver Creator, SlideShow Creator.
Properties, Methods, Events, Software Developers Kit
=================================================

Quote:

> Is there a way to say when the first comma come up do this, one the second
> comma do this, and on the third comma do this? So that I can turn "650 town
> center drive,box #2 park center-back dock,costa mesa, ca 92626" into
> "<street>650 town center drive</street><location>box #2 park center-back
> dock</location><city>costa mesa</city><state>ca</state> <zip>92626</zip>

> Brian



Tue, 07 May 2002 03:00:00 GMT  
 Text String Manipulation

Ummm, there's a function reference online, however...

dim strDate1, strDate2
strDate1 = "11201999"
strDate2 = Left(strDate1, 2) & "-" & Mid(strDate1, 3, 2) & "-" & Mid(strDate1, 5)

-glenn-

  Super it worked!
  Thanks
  Another question??
  for a given string "11201999"
  Is there a way to say do this on the 2nd character and so on to produce "11-20-1999"?
  Thanks!

    Brian,

    This can be put in a loop and the tags assigned to another array.

    <snip>

    Dim aAddress
    Dim sAddress
        sAddress = "650 town center drive,box #2 park center-back dock,costa mesa, ca 92626"
        aAddress = Split( sAddress )
        sAddress = "<street>" & aAddress(0) & "</street><location>>" & aAddress(1) &_
                         "</location><city>" & aAddress(2) & "</city><state>" & aAddress(3) &_
                         "</state> <zip>" & aAddress(4) & "</zip>"
    </snip>

    --
    Nic Roche
    Net Extra
    www.extra.net.au
    =================================================
    imagex - Web Imaging - activex thin client
    Button Creator, Thumbnail Creator, Imaging Lite, ImageMap Creator,
    MouseOver Creator, SlideShow Creator.
    Properties, Methods, Events, Software Developers Kit
    =================================================


    > Is there a way to say when the first comma come up do this, one the second
    > comma do this, and on the third comma do this? So that I can turn "650 town
    > center drive,box #2 park center-back dock,costa mesa, ca 92626" into
    > "<street>650 town center drive</street><location>box #2 park center-back
    > dock</location><city>costa mesa</city><state>ca</state> <zip>92626</zip>
    >
    > Brian
    >
    >



Thu, 09 May 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. String/Text Manipulations

2. string manipulation, string routines, etc.

3. String manipulation with vbscript

4. String manipulation topic

5. String manipulation

6. String manipulation...

7. String manipulation...

8. ps string manipulation... ppuulllEEEEEEZZZZZZ

9. Newbie question : string manipulation with VBscript.

10. String manipulation

11. String manipulation help

12. Help for a Newbie: CSV data to be used in string manipulation

 

 
Powered by phpBB® Forum Software