|
-
October 16th, 2001, 02:43 AM
#1
removing characters from a string
I am a VB novice so any help would be appreciated!
I need to search through a string and replace any carriage returns, commas and line feeds with spaces. How can I do this?
Thanks
-
October 16th, 2001, 03:01 AM
#2
Re: removing characters from a string
get the help on following using MSDN & try it urself
- Mid() , Instr() , Replace() , Chr() , Asc() ....
If u don't know how to Rate an answer, then Rate my answer to learn, If u know, then practice it 
-
October 16th, 2001, 03:21 AM
#3
Re: removing characters from a string
Shrinka is right, but for a quick solution:
mystring= replace(mystring,vbcrlf, "")
mystring= replace(mystring,",", "")
mystring= replace(mystring,chr(13) & " ", "")
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
October 16th, 2001, 03:22 AM
#4
Sorry!
I mispelled your nickname. Sorry...
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
October 16th, 2001, 03:23 AM
#5
Re: removing characters from a string
dim str as string
str = "This is a s,tring with some tabs,commas
and one carriage return"
str = Replace(str,","," ")
str = Replace(str,vbCrLf," ")
str = Replace(str,vbTab," ")
O/P :"This is a s tring with some tabs commas and one carriage return"
-
October 16th, 2001, 03:24 AM
#6
Re: removing characters from a string
-
October 16th, 2001, 06:32 AM
#7
Re: Sorry!
with regard to mis-spell - that's alright!!!
That's not my Nick Name but the Name
i couldn't reply in detail as I was busy at that time
Have a nice Day
Srinika
If u don't know how to Rate an answer, then Rate my answer to learn, If u know, then practice it 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|