How can I replace a list of special characters of 10 or more characters. Do I need to use 10 StringReplacers?
How is the column with the special characters structured? Space delimited? Comma delimited?
I read the column from a database. All characters used are readable. Every record in this column is varchar(100). I need to change most of the special characters by ' '; my special character list that need to be replaced are: !"§$%/()=?\\*+'# but not &-
Did you look at the StringPairReplacer? Note that you must use <backslash>+<space> to indicate that you want to replace something with a <space>, as explained in the documentation. Example to replace # and ! with a space:
# \ ! \
Another optoin is to use a reular expression - this one should work:
!|"|§|\$|%|/|\(|\)|\=|\?|\\|\*|\+|'|#
The "|" charachter in a reqular expression is like a logical OR. You need to use "\" to escape some of the charachters.
Another optoin is to use a reular expression - this one should work:
!|"|§|\$|%|/|\(|\)|\=|\?|\\|\*|\+|'|#
The "|" charachter in a reqular expression is like a logical OR. You need to use "\" to escape some of the charachters.
Excellent!