Page 1 of 1

how to remove starting and ending duoble quotes

Posted: Fri Feb 16, 2007 5:02 am
by parvathi
Hi
I have varibale with in duoble quotes

ex var="hello"

I want the variable without duoble quotes

just var = hello

how can i do this?

Posted: Fri Feb 16, 2007 5:19 am
by ArndW
Use TRIM(Your.ColumnName,'"','B')

Posted: Fri Feb 16, 2007 5:36 am
by ray.wurlod
Or InLink.ColName[2,Len(InLink.ColName)-2]

Or Field(InLink.ColName, '"', 2, 1)

Question: which of the three methods is the most efficient?

Posted: Fri Feb 16, 2007 6:06 am
by parvathi
Thanks a lot
Trimming with field function i find it as the most efficient

But Even trim functions is also easier to me

Posted: Fri Feb 16, 2007 6:15 am
by kumar_s
Thanks for mentioning the option that you going to use. So its time for you to mark the topic as resolved.

Posted: Thu Jan 28, 2010 1:58 am
by kejuste
I tried using all the there options.

I found function InLink.ColName[2,Len(InLink.ColName)-2] is more useful than other.

thanks Ray

Posted: Thu Jan 28, 2010 6:19 am
by chulett
Hmmm... I would use Convert() for that.

Convert('"','',InLink.ColName)

Posted: Thu Jan 28, 2010 3:24 pm
by ray.wurlod
I'd be more cautious and check first that the characters occur only on the ends.

Code: Select all

If InLink.TheString Matches \'"'0X'"'\ Then InLink.TheString[2,Len(TheString)-2] Else InLink.TheString
Using substring allows for the possibility that there are double-quote characters within the string as well as surrounding it.