473,385 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Quotation Mark in string

Hi,

How do I trim double quotation mark " in a string? Or, how
do I match pattern if the string has double quotation mark
already like "string"? Thanks in advance.

Hugh
Nov 20 '05 #1
4 3757
this should do it

Dim s As String = "this is a string w "" in it and at the end """
s = s.Trim(""""c)
Debug.WriteLine(s)

hope it helps

eric

<an*******@discussions.microsoft.com> wrote in message
news:23****************************@phx.gbl...
Hi,

How do I trim double quotation mark " in a string? Or, how
do I match pattern if the string has double quotation mark
already like "string"? Thanks in advance.

Hugh

Nov 20 '05 #2
* <an*******@discussions.microsoft.com> scripsit:
How do I trim double quotation mark " in a string? Or, how
do I match pattern if the string has double quotation mark
already like "string"? Thanks in advance.


Encode each double quotation mark with /two/ double quotation marks
inside the string literal:

\\\
MsgBox("He said: ""Hello World!""")
///

For a string containing a single quotation mark type '""""' (without the
"'"s) or use 'ControlChars.Quote'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
Hi Eric,

I tried your code, the quotation after W is still there.
Does it only trim one charactor at once? Thanks.

Hugh
-----Original Message-----
this should do it

Dim s As String = "this is a string w "" in it and at the end """ s = s.Trim(""""c)
Debug.WriteLine(s)

hope it helps

eric

<an*******@discussions.microsoft.com> wrote in message
news:23****************************@phx.gbl...
Hi,

How do I trim double quotation mark " in a string? Or, how do I match pattern if the string has double quotation mark already like "string"? Thanks in advance.

Hugh

.

Nov 20 '05 #4
<an*******@discussions.microsoft.com> schrieb
Hi Eric,

I tried your code, the quotation after W is still there.
Does it only trim one charactor at once? Thanks.


Look what the Trim method does. If you want to delete it, use the Replace
method.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robert Garrett | last post by:
Hi, I've created a table in SQL Server 2000 and I'm now trying to search through the data and return specific rows. I'm using this command: select * from Export where libelle_court='Recherche...
63
by: Tristan Miller | last post by:
Greetings. Do any popular browsers correctly support <q>, at least for Western languages? I've noticed that Mozilla uses the standard English double-quote character, ", regardless of the lang...
4
by: Thomas Miskiewicz | last post by:
Hi! Is using of a double quotation mark with a URL a problem? For example: http://myserver.com/query?field1=something&field2=test&params="field1=test1"+"field2=test2" Regards Thomas
9
by: M P | last post by:
Hi! I am looking for a way that I can trap the single quotation mark. If an encoder uses single quotation mark on a textbox field, it always give me an error because I use single quotes on the...
3
by: Ufit | last post by:
Simple,dumm question - how to include quotation marks in the string? F.ex. "Data Source=.\SQLEXPRESS;AttachDbFilename="C:\client data.mdf";Integrated Security=True;User Instance=True" I get syntax...
5
by: tomcarr1 | last post by:
If I want to search for a character within a sring, I normally use x = myString.IndexOf("T") However, what if I want to look for a quotation mark within the string? I have tried x =...
6
by: Karl Groves | last post by:
I have a form which contains a field for "height". If someone places an entry such as: 5'6" the form seems like it completely empties that value. It does NOT do this on my machine, but does...
31
by: The Bicycling Guitarist | last post by:
Hi. For many years I have been using &quot; for double quotation marks in the HTML code, but the opening and closing quotation marks render the same in my browser. I'm considering going through and...
1
by: U Aye Thein | last post by:
I found in internet how to solve single quotation mark in string and how to solve double quotation mark in string but my string may be contained single quote or double quote. How to write an...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.