Getting rid of |

Results 1 to 3 of 3

Thread: Getting rid of |

  1. #1
    Adrian Guest

    Default Getting rid of |

    list my data like this (from a database...access):<BR>name &#124 name &#124 name &#124... after each name is &#124 to divide but I would like to get rid of the last &#124 <BR>Is the solution is to hard don&#039;t worry it&#039;s not very improtant.<BR>-Adrian

  2. #2
    Join Date
    Dec 1969

    Default RE: Getting rid of |

    the last one in a row, just before the linebreak?<BR><BR>Replace(str, "&#124" & vbcrlf, "")<BR><BR>actually a regular expression would be more reliable.<BR><BR>j

  3. #3
    Join Date
    Dec 1969

    Default RE: Getting rid of |

    Atrax&#039;s solution works if you have the vbCRLF on the end.<BR><BR>If not:<BR><BR>text = Left( text, Len(text)-1 ) <BR><BR>will chop off the right-most character.<BR><BR>If you aren&#039;t putting all the stuff into a single string, though, then the easiest way is to put the &#124 *AHEAD* of the items instead of *AFTER* them!<BR><BR>Thus:<BR><BR>&#060;%<BR>first = true<BR>For Each ... <BR>&nbsp; &nbsp; If Not first Then Response.Write " &#124 "<BR>&nbsp; &nbsp; first = false<BR>&nbsp; &nbsp; ...<BR>Next<BR>%&#062;<BR><BR>(The For Each could as easily be DO UNTIL or any other kind of loop control.)<BR><BR>

Posting Permissions

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