2007 Jan 30 12:26 AM
Hi all,
I want to check whether a variable has a single quote or double quote. If it has I have to remove them.
"Don't".
In this case it has both single and double quote. I want to change this to
Dont
If there is any escape character for ' (single quote) please let me know.
Thanks.
2007 Jan 30 12:36 AM
The escape character for Single Quote...Is another Single Quote -:)
<b>''This is single quoted''</b>.
Greetings,
Blag.
Or........... in new releases, you can use the backwards quote as the wrapper. The syntax checker can then see the single quote (').
data: str type string.
str = `"Don't"`.
translate str using `" `.
TRANSLATE str using `' `.
CONDENSE str NO-GAPS.
write:/ str.Regards,
RIch Heilman
2007 Jan 30 12:36 AM
The escape character for Single Quote...Is another Single Quote -:)
<b>''This is single quoted''</b>.
Greetings,
Blag.
2007 Jan 30 12:42 AM
2007 Jan 30 12:43 AM
Hi Rich,
That is cool. Which release does this apply to?
Cheers
Gareth
2007 Jan 30 1:14 AM
I know that it works in Netweaver 2004s, I think it may work in NW2004 as well. I know for a fact that this does not work in 46c.
Yeah, it is cool. I have been so used to using multiple quotes to represent single quotes, and it does get confusing, so this syntax is really helpful.
Regards,
Rich Heilman
2007 Jan 30 3:25 AM
Many Thanks for the tip Rich.
It works for me on 4.7
Regards
Eswar
2007 Jan 30 3:14 PM
2007 Jan 30 12:40 AM
Hi,
This is how you do it.
constants: c_comma type c value ''''.
So in you case you would add the above to your data declarations and then search your field for c_comma and use replace c_comma with '' into <field>.
Regards
Gareth
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |