Hi Brian, how are you?
I have a problem. I want to remove the character " from a field. I do not wisht o use @strip because it removes all special characters. I could not find a function that will accept " as the character to handle (replace, remove, etc. - they all failed)
Thans!
Avi
avikerem
Offline
Last seen: 2 years 10 months ago
Joined: 04/07/2015 - 00:28
Hi Avi,
I am doing well, how are you doing these days.
Actually there is a trick to do this. You have to replace the # with @chr(34) which is the same as #. So if you use the replace you would need something like this: @replace(MY_FIELD, @chr(34), " ") if you want to replace the # with a space.
Brian
I actually use char(34) a lot... The problemwas I tried chr(34) in the script formula and you actually need @chr(34)..
THANKS A LOT as usual for yopur excellent solution and quick response.
So I guess you could have an equation like this:
field.Equation = "@Replace(FIELD1, @chr(34), " & chr(34) & "a" & chr(34) & ")"
Exactly! LOL
Try using just a single quote between the double quotes with @Remove. Equation is @Remove(FIELDNAME, "'") Your character " is really just 2 ' together.
??
You must be joking, right?
@Replace(FIELD_NAME, @chr(10)," ") to remove line feeds from ASCII IDEA works just great. Does anyone have a method that will work with UNICODE?
@chr() is not an available function. @Strip() is not an option as it will remore ALL spaces & punctuation in addition to the "\n". I can use @RegExp(FIELD_NAME,"\n") to identify problem fields/records, but I get stuck after that.
Off the top of my head you might need the Unicode version of IDEA. Per the IDEAScript help:
Note: The IDEA ASCII version that you currently have installed will only read ASCII files, not Unicode files.
Or you need to find a text editor and do the find / replace outside of IDEA and then perform the import. Notepad reads unicode text files, when I have had a problem previously I opened it in notepad and then resaved it as an ANSI file and that fixed my unicode problem. If you are working with a database this probably won't help you out.
Brian