
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Replace to all columns
Hello,
I have a file with 16 columns. Most of these columns have special characters ^~. I want to erase these symbols from all columns but I dont want to go in every column and put replaceAll(). I want to find a way to apply this method (.replaceAll()) one time and catch all columns.
Thanks a lot.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@DrGenious, as in the other example, use a tJavaRow:
tFileInputRaw --> tJavaRow --> tFileOutputRaw
Here is the expression you have to use:
output.content = input.content.replaceAll("\^~", "");
Other solution is good as you don't have read the file twice but if data contains the field separator character, it will not work as expected.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Where I will put the String.replaceALL() ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
you could just use tFileInputFullRow -- tJavaRow -- "someOutPut" like in the follwoing screenshot...of course you can do type conversions etc. in the Java Code.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot for your answer. The only wαy to achieve this is with array?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@DrGenious, as in the other example, use a tJavaRow:
tFileInputRaw --> tJavaRow --> tFileOutputRaw
Here is the expression you have to use:
output.content = input.content.replaceAll("\^~", "");
Other solution is good as you don't have read the file twice but if data contains the field separator character, it will not work as expected.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If so, thanks to mark your case as solved (Kudos also accepted).
