<?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: tExtractRegexFields not working in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337408#M105752</link>
    <description>&lt;P&gt;Hello &lt;A href="https://community.qlik.com/s/profile/0053p000007LLI7AAO"&gt;@priyadarshiniv&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please, try this :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;"^"+
"([0-9]{2})?(\\.[A-Z])?([0-9][0-9])?(-[0-9][0-9])?" +
"(.*)" &lt;/PRE&gt;
&lt;P&gt;Don't forget to create at least 5 columns in the schema&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;inputString:&lt;BR /&gt;expected Result:&lt;BR /&gt;&lt;BR /&gt;Then I will help you write the regex&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2019 14:42:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-05-28T14:42:33Z</dc:date>
    <item>
      <title>tExtractRegexFields not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337402#M105746</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt; 
&lt;P&gt;I want to split one column. For example, 21.A-01-BTA or 21.A03-01-BTA. The split I want to do is like&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;BDel: 21&lt;/P&gt; 
&lt;P&gt;Group: A&lt;/P&gt; 
&lt;P&gt;UnderGroup: (if there is any number after Group then it should go to UnderGroup). So for 1st example it will be Null and for 2nd it will be 03&lt;/P&gt; 
&lt;P&gt;Remaining string1: 01&lt;/P&gt; 
&lt;P&gt;Remaining string2: BTA&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried to use&amp;nbsp;tExtractRegexFields with the following expression but i get no values&lt;/P&gt; 
&lt;P&gt;"([0-9][0-9]).([A-Z])([0-9][0-9])?-([0-9])-([A-Z])"&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;-- Used '?' since undergroup might or might not be present for the group.&lt;/P&gt; 
&lt;P&gt;What is the correct syntax for this?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt; 
&lt;P&gt;Priyadarshini&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 15:41:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337402#M105746</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-27T15:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: tExtractRegexFields not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337403#M105747</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLI7AAO"&gt;@priyadarshiniv&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please refer the below details for parsing of data. Please note that I have considered only happy path of data. So you will have to do testing with various conditions and make necessary amendments for null checking and string length. The solutions for these two are already available in stackoverflow. So I am not touching on that aspect and give it as a hands-on exercise to you.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 650px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5Ar.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135888iA2C92F5C7201C5E6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5Ar.png" alt="0683p000009M5Ar.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M59G.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131072iC33A2BDCE6F35EB5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M59G.png" alt="0683p000009M59G.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 620px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3QB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150661i2DF3CF9A32CC05F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3QB.png" alt="0683p000009M3QB.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Coming to the java functions, please refer below.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;var1 -&amp;gt;             row1.input.substring(row1.input.indexOf(".")+1,row1.input.indexOf("-")).replaceAll("\\D+","") 

BDel -&amp;gt;             row1.input.substring(0 ,row1.input.indexOf(".")) 
Group -&amp;gt;            row1.input.substring(row1.input.indexOf(".")+1,row1.input.indexOf("-")).replaceAll("[^A-Za-z]+", "") 
UnderGroup -&amp;gt;      Var.var1.equals("")?null:Var.var1 
R_string1-&amp;gt;        row1.input.substring(row1.input.indexOf("-") +1,row1.input.indexOf("-", row1.input.indexOf("-") +1)) 
R_string2-&amp;gt;        row1.input.substring(row1.input.indexOf("-", row1.input.indexOf("-") +1)+1) &lt;/PRE&gt; 
&lt;P&gt;Hope you are happy with the resolution. Please spare a minute to give kudos and mark the topic as resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 17:28:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337403#M105747</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-27T17:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: tExtractRegexFields not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337404#M105748</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000006eKOgAAM"&gt;@nthampi&lt;/A&gt;&amp;nbsp;!!! I will check it today!&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt; 
&lt;P&gt;Priya&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 08:14:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337404#M105748</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-28T08:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: tExtractRegexFields not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337405#M105749</link>
      <description>&lt;P&gt;Another alternative is to use this regex :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"^"+
"([0-9]{2}).([A-Z])([0-9][0-9])?-([0-9][0-9])-([A-Z]{3})" +
".*"&lt;/PRE&gt;&lt;P&gt;make sure you create at least 5 columns in your shema&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 08:28:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337405#M105749</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-28T08:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: tExtractRegexFields not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337406#M105750</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000006eKOgAAM"&gt;@nthampi&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When I use this I get this error!&lt;/P&gt; 
&lt;P&gt;String index out of range: -4&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 08:50:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337406#M105750</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-28T08:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: tExtractRegexFields not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337407#M105751</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LPZEAA4"&gt;@dgm01&lt;/A&gt;&amp;nbsp;for your reply! I need one more help! Instead of having Remaining_1 and Remaining_2 I want to have everything after UnderGroup to go in as one part. Tried this but gives wrong result:&lt;/P&gt; 
&lt;P&gt;"^"+&lt;/P&gt; 
&lt;P&gt;"([0-9]{2})?(\\.[A-Z])?([0-9][0-9])?(-[0-9][0-9])?(-[.]*)?" +&lt;/P&gt; 
&lt;P&gt;".*" &amp;nbsp;&lt;/P&gt; 
&lt;P&gt;for&amp;nbsp;&lt;SPAN&gt;21.A03-01-BTA&amp;nbsp; it&lt;/SPAN&gt; gives me&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;BDel: 21&lt;/P&gt; 
&lt;P&gt;Group: A&lt;/P&gt; 
&lt;P&gt;UnderGroup:03&lt;/P&gt; 
&lt;P&gt;Rest1: 01&lt;/P&gt; 
&lt;P&gt;It doesnt take the last part -BTA. Might be "-" is not trated as a character. How can then the expression be?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt; 
&lt;P&gt;Priya&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 09:47:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337407#M105751</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-28T09:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: tExtractRegexFields not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337408#M105752</link>
      <description>&lt;P&gt;Hello &lt;A href="https://community.qlik.com/s/profile/0053p000007LLI7AAO"&gt;@priyadarshiniv&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please, try this :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;"^"+
"([0-9]{2})?(\\.[A-Z])?([0-9][0-9])?(-[0-9][0-9])?" +
"(.*)" &lt;/PRE&gt;
&lt;P&gt;Don't forget to create at least 5 columns in the schema&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;inputString:&lt;BR /&gt;expected Result:&lt;BR /&gt;&lt;BR /&gt;Then I will help you write the regex&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 14:42:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tExtractRegexFields-not-working/m-p/2337408#M105752</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-28T14:42:33Z</dc:date>
    </item>
  </channel>
</rss>

