<?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: Regex in tmap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Regex-in-tmap/m-p/2231407#M21718</link>
    <description>&lt;P&gt;Hi..&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;It's working for me!!..&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks,&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Mar 2020 02:30:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-03-06T02:30:46Z</dc:date>
    <item>
      <title>Regex in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Regex-in-tmap/m-p/2231405#M21716</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a question. My input data as below and i need to extract the 5 digits to put into column &lt;STRONG&gt;PlaceCode&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you help me on how i can get the exact 5 digit for column&amp;nbsp;&lt;STRONG&gt;PlaceCode&lt;/STRONG&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;For example:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Input:&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE width="543px"&gt;
 &lt;TBODY&gt;
  &lt;TR&gt;
   &lt;TD width="541.25px"&gt;&lt;STRONG&gt;Place&lt;/STRONG&gt;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR&gt;
   &lt;TD width="541.25px"&gt;89 1st Floor Jalan P. Samad 93400 Kuching P.o. Box 1543&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR&gt;
   &lt;TD width="541.25px"&gt;Tingkat 2, Jalan Kulas 84201 Kuching&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR&gt;
   &lt;TD width="541.25px"&gt;12-E Tingkat 42, Wisma Jalan Kamaruddin 20400 Kuala&lt;/TD&gt;
  &lt;/TR&gt;
 &lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="552px"&gt;
 &lt;TBODY&gt;
  &lt;TR&gt;
   &lt;TD width="456.25px" height="27px"&gt;&lt;STRONG&gt;Place&lt;/STRONG&gt;&lt;/TD&gt;
   &lt;TD width="93.75px" height="27px"&gt;&lt;STRONG&gt;PlaceCode&lt;/STRONG&gt;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR&gt;
   &lt;TD width="456.25px" height="27px"&gt;89 1st Floor Jalan P. Samad &lt;STRONG&gt;93400&lt;/STRONG&gt; Kuching P.o. Box 1543&lt;/TD&gt;
   &lt;TD width="93.75px" height="27px"&gt;93400&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR&gt;
   &lt;TD width="456.25px" height="27px"&gt;Tingkat 2, Jalan Kulas &lt;STRONG&gt;84201&lt;/STRONG&gt; Kuching&amp;nbsp;&lt;/TD&gt;
   &lt;TD width="93.75px" height="27px"&gt;84201&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR&gt;
   &lt;TD width="456.25px" height="27px"&gt;12-E Tingkat 42, Wisma Jalan Kamaruddin &lt;STRONG&gt;20400&lt;/STRONG&gt; Kuala&lt;/TD&gt;
   &lt;TD width="93.75px" height="27px"&gt;20400&lt;/TD&gt;
  &lt;/TR&gt;
 &lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;MKAIL&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 08:50:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Regex-in-tmap/m-p/2231405#M21716</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-05T08:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Regex in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Regex-in-tmap/m-p/2231406#M21717</link>
      <description>&lt;P&gt;hello,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;you could use the regex in a tjavarow to extract that info.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;in advanced settings of tjavarow , add:&lt;/P&gt; 
&lt;P&gt;import java.util.regex.*;&lt;/P&gt; 
&lt;P&gt;example code :&lt;/P&gt; 
&lt;P&gt;1 column input - name "inputData":&lt;/P&gt; 
&lt;P&gt;2 output&amp;nbsp;columns&amp;nbsp; : "output"&amp;nbsp; and "PlaceCode"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;//Code generated according to input schema and output schema

Pattern pattern = Pattern.compile("\\b\\d{5}\\b");
Matcher matcher = pattern.matcher(input_row.inputData);
output_row.PlaceCode="";
output_row.output = input_row.inputData;

	while(matcher.find()) {
            //System.out.println("found: " + matcher.group());
            output_row.PlaceCode = matcher.group();
            }
    



&lt;/PRE&gt; 
&lt;P&gt;result:&lt;/P&gt; 
&lt;PRE&gt;.-------------------------------------------------------.
|                      tLogRow_11                       |
|=-----------------------------------------------------=|
|inputData                                              |
|=-----------------------------------------------------=|
|89 1st Floor Jalan P. Samad 93400 Kuching P.o. Box 1543|
|Tingkat 2, Jalan Kulas 84201 Kuching                   |
|12-E Tingkat 42, Wisma Jalan Kamaruddin 20400 Kuala    |
'-------------------------------------------------------'

.-------------------------------------------------------+---------.
|                           tLogRow_13                            |
|=------------------------------------------------------+--------=|
|output                                                 |PlaceCode|
|=------------------------------------------------------+--------=|
|89 1st Floor Jalan P. Samad 93400 Kuching P.o. Box 1543|93400    |
|Tingkat 2, Jalan Kulas 84201 Kuching                   |84201    |
|12-E Tingkat 42, Wisma Jalan Kamaruddin 20400 Kuala    |20400    |
'-------------------------------------------------------+---------'&lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 797px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9xT.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137050i785FDC6711D818DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9xT.png" alt="0683p000009M9xT.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 12:37:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Regex-in-tmap/m-p/2231406#M21717</guid>
      <dc:creator>uzix</dc:creator>
      <dc:date>2020-03-05T12:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Regex in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Regex-in-tmap/m-p/2231407#M21718</link>
      <description>&lt;P&gt;Hi..&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;It's working for me!!..&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks,&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 02:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Regex-in-tmap/m-p/2231407#M21718</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-06T02:30:46Z</dc:date>
    </item>
  </channel>
</rss>

