Created 10-14-2016 10:17 AM
Hi:
I need that the 'ñ' caracter DOESNT be replaced in this code,
REPLACE($0,'([^a-zA-Z\\n\\.\\-]+)',''))
anny sugestion about how can do that?
thanks
Created 10-14-2016 01:36 PM
In the ascii table n tilde is represented as octal 0361 which is represented in regex simply as \0361. So simply include [^\\0361] in your expression to prevent n tilde from being replaced by ' '.
This should work for you
REPLACE($0,'[^a-zA-Z\\0361\\n\\.\\-]+','')
See:
http://web.cs.mun.ca/~michael/c/ascii-table.html
http://www.regular-expressions.info/refcharacters.html
@Roberto Sancho -- I have corrected the code in this answer. The above works for me. If this is what you are looking for, please accept the answer, else please let me know remaining gaps.
Created 10-14-2016 01:36 PM
In the ascii table n tilde is represented as octal 0361 which is represented in regex simply as \0361. So simply include [^\\0361] in your expression to prevent n tilde from being replaced by ' '.
This should work for you
REPLACE($0,'[^a-zA-Z\\0361\\n\\.\\-]+','')
See:
http://web.cs.mun.ca/~michael/c/ascii-table.html
http://www.regular-expressions.info/refcharacters.html
@Roberto Sancho -- I have corrected the code in this answer. The above works for me. If this is what you are looking for, please accept the answer, else please let me know remaining gaps.
Created 10-14-2016 01:57 PM
hi:
i tried this but still doesnt work, any other suggestion? many many thanks
REPLACE($0,'[^\\361a-zA-Z\\n\\.\\-]+)','')) or REPLACE($0,'([^a-zA-Z\\n\\.\\-\\361]+)',''))
Created 10-14-2016 02:03 PM
@Roberto Sancho Could you share a few lines of the file you are using (including n tilde)? Tx
Created 10-14-2016 03:47 PM
@Roberto Sancho I have it working. I have edited the original answer with the working code
Note the following
Created 10-16-2016 08:18 AM
Hi:
i tried the new code, and its working now like that:
REPLACE($0,'[^a-zA-Z\\0361\\n\\.\\-]+','')
Many thanks.