Using Replace function to remove two different characters

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • J. Muenchbourg

    #1

    Using Replace function to remove two different characters


    I'm using replace function to strip 0s from a particular string:
    <%=replace(rs1( "racelength")," 0","''"%>

    but I need to also strip empty spaces from the string in question. This
    doesn't work :
    <%=replace(rs1( "racelength")," 0"" ","''""''"% >

    can't figure out how to nest the "replace" routine here

    thanx for help
    Muench


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Andrew Durstewitz

    #2
    Re: Using Replace function to remove two different characters

    Response.Write Replace(Replace (rs1("racelengt h"),"0","")) ," ","")

    hth,
    Andrew

    * * * Sent via DevBuilder http://www.devbuilder.org * * *
    Developer Resources for High End Developers.

    Comment

    • MN

      #3
      Re: Using Replace function to remove two different characters

      Andrew Durstewitz <adurstew@devbu ilder.org> wrote in message news:<3f0c5191$ 0$204$75868355@ news.frii.net>. ..[color=blue]
      > Response.Write Replace(Replace (rs1("racelengt h"),"0","")) ," ","")
      >
      > hth,
      > Andrew
      >
      > * * * Sent via DevBuilder http://www.devbuilder.org * * *
      > Developer Resources for High End Developers.[/color]

      one too many )'s :)

      Comment

      • Dhananjay Modak

        #4
        Re: Using Replace function to remove two different characters

        Or use a regular expression

        "MN" <imthedaddynah@ hotmail.com> wrote in message
        news:adb8f7dd.0 307110644.168f9 978@posting.goo gle.com...[color=blue]
        > Andrew Durstewitz <adurstew@devbu ilder.org> wrote in message[/color]
        news:<3f0c5191$ 0$204$75868355@ news.frii.net>. ..[color=blue][color=green]
        > > Response.Write Replace(Replace (rs1("racelengt h"),"0","")) ," ","")
        > >
        > > hth,
        > > Andrew
        > >
        > > * * * Sent via DevBuilder http://www.devbuilder.org * * *
        > > Developer Resources for High End Developers.[/color]
        >
        > one too many )'s :)[/color]


        Comment

        • Andrew Durstewitz

          #5
          Re: Using Replace function to remove two different characters

          Sorry, must have fat finger the extra ")".

          :oP
          -Andrew

          * * * Sent via DevBuilder http://www.devbuilder.org * * *
          Developer Resources for High End Developers.

          Comment

          Working...