Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 9th, 2008, 09:18 PM
Authorized User
 
Join Date: Aug 2006
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default Replace the string has comma with spaces?

hi everybody..i need some help.
let say i have one string
"today, i eat, a, bread"

how can i count where is the comma and then i need to replace them with spaces?
is it just use Replace(str,","," ")?

plz help me..thanx

 
Old January 9th, 2008, 09:42 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Yes thats correct.

response.write replace("today, i eat, a, bread",","," ")

Did you try it before posting, seems like you already knew?

Wind is your friend
Matt
www.elitemarquees.com.au
 
Old January 10th, 2008, 03:50 AM
Authorized User
 
Join Date: Aug 2006
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by mat41
 Yes thats correct.

response.write replace("today, i eat, a, bread",","," ")

Did you try it before posting, seems like you already knew?

Wind is your friend
Matt
www.elitemarquees.com.au
oops..soli..i jz wonder to know is there any other methods in vbscript to get it only.anyway, thanx

 
Old January 10th, 2008, 06:41 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

You are welcome. Im sure there is another way however this is the one I would use.

Wind is your friend
Matt
www.elitemarquees.com.au





Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue in escaping comma from string in transforms joshuaa XSLT 5 August 20th, 2008 03:25 AM
Formatting string with comma arnabghosh SQL Server 2005 1 October 16th, 2007 01:38 AM
Help in instruction string-replace hugoscp XML 9 October 20th, 2006 12:07 PM
replace string value str33ts XSLT 1 April 22nd, 2005 04:01 AM
how to replace a string with another string/number crmpicco Javascript How-To 4 March 14th, 2005 12:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.