Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > How to replace first and last "," in a string in asp vbscript?

Thread Tools

How to replace first and last "," in a string in asp vbscript?

Posts: n/a
Mystring = Left(Mystring,Len(Mystring) - 1)
Mystring = Mid(Mystring,2)

That should do it.

>-----Original Message-----
>How can I replace first as well as last "," in a string?
>Mystring = ",3,2,5,6,1,65,22,"
>I would like to replace commas on each sides with "".
>I am new to asp and would be grateful for your help.
>Thanks in advance.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Replace /n with a XHTML <br /> using string.replace Alun ASP .Net 3 02-18-2008 05:52 AM
How to replace the last (and only last) character in a string? Johny Python 8 05-03-2007 09:24 PM
how common is it to get email spam with your first, first and last and/or home town in it? Lookout Computer Support 16 04-27-2006 07:42 AM
[rcr] String#first / String#last Simon Strandgaard Ruby 29 10-26-2004 09:25 AM