ASP Hosting sale!
Double disk space and transfer for FREE!
Limited time offer! Act Now!

aspdev | articles | tutorials | forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do I remove sub-strings from a string

 
Post new topic   Reply to topic    ASPdev.org Forum Index -> ASP programming
View previous topic :: View next topic  
Author Message
Rich



Joined: 18 Oct 2004
Posts: 4

PostPosted: Mon Nov 01, 2004 1:24 pm    Post subject: How do I remove sub-strings from a string Reply with quote

Hi,

I have a very long string, and I want to clean it up a little, by removing certain sub-strings. How can I do that?



Thanks,

Rich
Back to top
View user's profile Send private message
TheDrummer



Joined: 11 Oct 2004
Posts: 4

PostPosted: Tue Nov 02, 2004 9:53 am    Post subject: Reply with quote

Well, you can use the ASP Replace function and do something like this:

Code:

strText = "AAAABBBBBBBBAAAA"
strText = Replace(strText, "AAAA", "PPPP")



After this ASP code is executed, the strText var will have value of "PPPPBBBBBBBBPPPP".

I hope this helps.


John
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ASPdev.org Forum Index -> ASP programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group

SQL Tutorial