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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
param123
Creator
Creator

Regex in tFileList component

Hi Team,

Can someone suggest, how to use regex expression in tFilelist component.

use case: i want to achive below...my tFilelist component must be able to identify below pattern files

1) file_501.txt

2) file_075.txt

I tried writing pattern as file_[(501)|(075)].txt, but didnt work.

Labels (2)
10 Replies
gjeremy1617088143

Hi @chiranjeevi kalla​ , in tFileList you can add multiple masks. so make one for file_501.txt and another for file_075.txt.

Send me love and kudos

param123
Creator
Creator
Author

@guenneguez jeremy​ , thanks for your response, I don't want to do it in that way, if in future i want to make a new file pattern entry i should touch the code again. i want to do it via single regex expression, so that i can contextualise and edit from backend. please let me know if you know a way how to achieve at single shot by writing regex

gjeremy1617088143

so uncheck the checkbox use globlal expression and you can use perl5 regex :

"file_(501|075).txt"

param123
Creator
Creator
Author

hi @guenneguez jeremy​  tried above, not picking any files...

gjeremy1617088143

i've tested it on TOS 7.3.1 and it's working, checkbox  use global expression unchecked and "file_(501|075).txt" in the expression field

param123
Creator
Creator
Author

HI @guenneguez jeremy​ , please check below design I am not able to achieve , please let me know if something wrong in the design or please share your design

 

 

0695b00000QFw3WAAT.png0695b00000QFw2dAAD.png

gjeremy1617088143

could you send the content of the tJava?

param123
Creator
Creator
Author

hi, @guenneguez jeremy​  I am just printing the file name thats it...its not picking anything

 

0695b00000QFxWoAAL.png

param123
Creator
Creator
Author

Hi Talend team,

 

can someone help on this query?