<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Multiple regex exclude filemask on tFileList in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Multiple-regex-exclude-filemask-on-tFileList/m-p/2225927#M18022</link>
    <description>Hi Pierre 
&lt;BR /&gt;I have made a testing, I think Use external filemask does not support regex expression, as we can use a comma in a regex expression as the filemask in the basic setting of tFileList. I have open a jira issue for our R&amp;amp;D team to investigate it. 
&lt;BR /&gt; 
&lt;A href="https://jira.talendforge.org/browse/TDI-43561" target="_blank" rel="nofollow noopener noreferrer"&gt;https://jira.talendforge.org/browse/TDI-43561&lt;/A&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong</description>
    <pubDate>Wed, 15 Jan 2020 09:08:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-01-15T09:08:07Z</dc:date>
    <item>
      <title>Multiple regex exclude filemask on tFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Multiple-regex-exclude-filemask-on-tFileList/m-p/2225926#M18021</link>
      <description>&lt;P&gt;Hello community,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;-- Version : Tos BD 6.5.1&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have an issue with regex applied on Talend component tFileList.&lt;/P&gt; 
&lt;P&gt;To be honest i think it is a problem that needs to be fixed by the designers (if it's has not been already done in 6.5+)&lt;/P&gt; 
&lt;P&gt;The issue appears when i want to use a regular expression to exclude some files in my tfilelist execution.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;For my example, i need to exclude 2 different types of files :&lt;/P&gt; 
&lt;PRE&gt;context.fileMask_1 = "^\\d+_{1}\\d+_{1}[A-Z]{3,4}(\\.pdf){1}$";
context.fileMask_2 = "^([A-Z]|\\d)+_{1}([A-Z]|\\d)+(\\.pdf){1}$";&lt;/PRE&gt; 
&lt;P&gt;In my tfileList i check the 'Use Exclude Filemask' case and insert the following code :&lt;/P&gt; 
&lt;PRE&gt;context.fileMask_2+","+context.fileMask_1&lt;/PRE&gt; 
&lt;P&gt;Got it? you can guess here there will be an issue since Talend have decided we can aggregate several excluding expression (that is a really good thing) using a comma!.&lt;/P&gt; 
&lt;P&gt;--&lt;/P&gt; 
&lt;P&gt;--&lt;/P&gt; 
&lt;P&gt;--&lt;/P&gt; 
&lt;P&gt;Still don't get it ? this error message will help you understand the issue:&lt;/P&gt; 
&lt;PRE&gt;Exception in component tFileList_4 (testtet)
java.util.regex.PatternSyntaxException: Unclosed counted closure near index 22
^\d+_{1}\d+_{1}[A-Z]{3
	at java.util.regex.Pattern.error(Unknown Source)
	at java.util.regex.Pattern.closure(Unknown Source)
	at java.util.regex.Pattern.sequence(Unknown Source)
	at java.util.regex.Pattern.expr(Unknown Source)
	at java.util.regex.Pattern.compile(Unknown Source)
	at java.util.regex.Pattern.&amp;lt;init&amp;gt;(Unknown Source)
	at java.util.regex.Pattern.compile(Unknown Source)
	at p_compta.testtet_0_1.testtet.tFileList_4Process(testtet.java:2037)
	at p_compta.testtet_0_1.testtet.tFileList_5Process(testtet.java:3361)
	at p_compta.testtet_0_1.testtet.tLoop_2Process(testtet.java:3639)
	at p_compta.testtet_0_1.testtet.runJobInTOS(testtet.java:3917)
	at p_compta.testtet_0_1.testtet.main(testtet.java:3752)&lt;/PRE&gt; 
&lt;P&gt;This error log shows us talend cuts my regex by the comma : "^\\d+_{1}\\d+_{1}[A-Z]{3&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;,&lt;/STRONG&gt;&lt;/FONT&gt;4}(\\.pdf){1}$"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So if someone has ever faced and avoided that problem successfully, i would be gratefull&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;ps : Trying to escape a comma is not a good idea on regular expressions &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MAB6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158321i00588DF41617C922/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MAB6.png" alt="0683p000009MAB6.png" /&gt;&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Best regards,&lt;/P&gt; 
&lt;P&gt;Pierre&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:45:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Multiple-regex-exclude-filemask-on-tFileList/m-p/2225926#M18021</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T03:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple regex exclude filemask on tFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Multiple-regex-exclude-filemask-on-tFileList/m-p/2225927#M18022</link>
      <description>Hi Pierre 
&lt;BR /&gt;I have made a testing, I think Use external filemask does not support regex expression, as we can use a comma in a regex expression as the filemask in the basic setting of tFileList. I have open a jira issue for our R&amp;amp;D team to investigate it. 
&lt;BR /&gt; 
&lt;A href="https://jira.talendforge.org/browse/TDI-43561" target="_blank" rel="nofollow noopener noreferrer"&gt;https://jira.talendforge.org/browse/TDI-43561&lt;/A&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 15 Jan 2020 09:08:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Multiple-regex-exclude-filemask-on-tFileList/m-p/2225927#M18022</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-15T09:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple regex exclude filemask on tFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Multiple-regex-exclude-filemask-on-tFileList/m-p/2225928#M18023</link>
      <description>&lt;P&gt;Hello S.Hong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your attention,&lt;/P&gt;&lt;P&gt;I am happy to help improving the TOS Solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pierre&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 09:24:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Multiple-regex-exclude-filemask-on-tFileList/m-p/2225928#M18023</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-15T09:24:45Z</dc:date>
    </item>
  </channel>
</rss>

