Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove quotes 1

Status
Not open for further replies.

Andy6666uk

Programmer
Jul 11, 2001
17
GB
How can I remove quote marks from text coming from either the page or the database?

Thanks Andy
 
Use the replace command to strip characters from strings. The syntax is:
replace(string1,chartofind,chartoreplace)
where:
string1 is the string you wish to serach in
chartofind is the character you wish to find
chartoreplace is the character you wish to replace it with

So for you particular example you would use...

replace(mystring,""","")

Hope that helps...

G -GTM Solutions, Home of USITE-
-=
 
I'm afraid I,ve tried these already:

strBlah = Replace(strBlah, ", "ANDquot;") (AND=&)
strBlah = Replace(strBlah, """, "ANDquot;")

But I get an error, the " in either case is seen as an end or beginning.

I was hoping there might be something like ANDquot; I could use to tell asp there is a quote mark there.

Thanks again Andrew
 
u should put chr(22) not char(22) for "
Replace(strBlah, chr(22),"")
 
if you're going to use replace, you need to pass in the actual " mark. By doing """, you'll get an error. instead, it needs to be """". ("" evaluates to a single quotation mark)

ex:
strBlah = replace(strblah, """","")

that should work
good luck
leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top