How to remove or replace quote marks in a text field
Forums
Hi Brian,
I hope all is well with you.
I've a problem with double quote marks " that I'm hoping you might be able to assist me with.
I've a macro analysing import declarations, and one of the things it does is fuzzy matching on goods descriptions.
It works great, but if the description field contains a double quote then the action field for that record will not work.
For example, on one line the text might be : 12" tubing
This quote mark appears to be confusing IDEA , as the action field always works except when the double quote appears.
I would like to either remove the double quote or replace it with a single quote. However, because the quote mark is used to create equations, IDEA doesn't allow the following:
@Replace(Description, """, " ") or @Remove(Description, """)
If I try to filter for lines with the double quote, @isini(""", Description) this doesn't work either.
It seems that IDEA sees the 'extra' double quote as an error in the code rather than the parameter I want to use.
I did try so see if I could do something with ASCII but it was beyond me.
I'd be grateful for any suggestions,
Thanks a millio,
Phil
Hi Phil, in this instance…
Hi Phil, in this instance you need to use the @Chr() function. @Chr(34) is the equivalent of the double quotes. So in your examples above where the double quote goes use the @Chr(34) and that should work.
@Remove( Description, @Chr(34))
@Replace(Description, @Chr(34), "")
Brian