Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Editing a .txt file in talend

i have a txt file wit more data i need to add a / after a particular word.is it possible to edit the content of a file .
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

i got the proper results
output_row.text = StringHandling.EREPLACE(input_row.text,"({4})","$1,");
Thank you all 0683p000009MACn.png

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Hi Avinash,
Read the file using tFileInputDelimited
use Ereplace system function for your "particular word" by "particular word" + "/"
output_row.text = StringHandling.EREPLACE(input_row.text,"avinash","avinash/");
use above code to to replace avinash by avinash/. This logic may help.
Thanks
Vaibhav
Anonymous
Not applicable
Author

Hi,
Or component TalendHelpCenter:tFileInputFullRow reads a given file row by row in case there is no consolidate field separator in your .txt file.
tFileInputFullRow-->tMap....ReplaceAll(string s1, string s2) in expression.
Best regards
Sabrina
Anonymous
Not applicable
Author

i want to add a comma after finding some fileformat like .txt .pdf .jpg .csv
with output_row.text = StringHandling.EREPLACE(input_row.text,"({4})",what should i mention here);

i have tried few things but dint get proper result

i want the output to be .txt,.pdf,.jpg,.csv
Anonymous
Not applicable
Author

i got the proper results
output_row.text = StringHandling.EREPLACE(input_row.text,"({4})","$1,");
Thank you all 0683p000009MACn.png
Anonymous
Not applicable
Author

Hi,
It is great. Thanks for sharing it with us.
Best regards
Sabrina