|
-
October 24th, 2005, 10:41 PM
#1
string concantenation
I'm doing a replace() in a string of text but unfortunately there are two " " with in the text. Well, VB isn't liking that, Is there a trick to concantenate the true "" that are surounding my text?
R.L.T.W. A+, NET+, CCNA
doin' my best
-
October 25th, 2005, 01:08 AM
#2
Re: string concantenation
 Originally Posted by dedub
I'm doing a replace() in a string of text but unfortunately there are two " " with in the text. Well, VB isn't liking that, Is there a trick to concantenate the true "" that are surounding my text?
Use Chr(34) instead of "
Example:
Code:
Text1.Text = Chr(34) & Text2.Text & Text3.Text & Chr(34)
Last edited by HanneSThEGreaT; October 25th, 2005 at 01:10 AM.
-
October 25th, 2005, 06:13 AM
#3
Re: string concantenation
Eh? Sorry? What exaclty are we talking about here? Do you mean you want double quotes? Well, placing two double quotes directly after each other acts as a single double quote character.
i.e.
str = """" & Text1 & """"
Note: """" is four double quotes. One to open the string, two as the double quote character, one to close the string.
Mike
-
October 25th, 2005, 12:51 PM
#4
Re: string concantenation
To ********, this is what Im doing...
Parsing text of a website. Im using the replace to pull out several instances of this line.
</td><tr bgcolor="#FFFFFF"><td>
notice the qutoes already in the string, that makes it difficult to concantenate. I have not tried HanneSThEGreaT's suggestion yet but Ill let you know
Thanks
R.L.T.W. A+, NET+, CCNA
doin' my best
-
October 25th, 2005, 06:09 PM
#5
Re: string concantenation
No... sorry still don't get what you are trying to do and where your problem lies. Maybe I'm just thick.
So you have this line.. do you want to get rid of it? If so:
Replace myString, "</td><tr bgcolor=""#FFFFFF""><td>", ""
Is that what you mean? If not then please explain what excatly you are trying to do.
Mike
-
October 25th, 2005, 06:37 PM
#6
Re: string concantenation
Mike, that is exactly what I wanted to do. After I added the xtra "" it worked like a charm and now Im that much smarter with strings, THANKS!
Darrin
R.L.T.W. A+, NET+, CCNA
doin' my best
-
October 25th, 2005, 07:13 PM
#7
Re: string concantenation
no prob. glad you came right
Mike
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
|