<?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 How to use REGEX in tJava(row,flex) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287789#M61337</link>
    <description>&lt;P&gt;I have hit a wall using tExtractRegexFields, namely positive lookahead, which does not appear to be in &lt;A href="https://help.talend.com/reader/oTq8z3qqpJ5FgEhqV58dIg/2zibv4uGyadl0FDBKvs~6w" target="_self" rel="nofollow noopener noreferrer"&gt;this list&lt;/A&gt;, so it appears I cannot use that component.&amp;nbsp;Let's start simple. How would I use a simple regex to match something from a column in a tFileInputDelimited and cat it to a tLogRow?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Apr 2018 17:57:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-04-19T17:57:07Z</dc:date>
    <item>
      <title>How to use REGEX in tJava(row,flex)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287789#M61337</link>
      <description>&lt;P&gt;I have hit a wall using tExtractRegexFields, namely positive lookahead, which does not appear to be in &lt;A href="https://help.talend.com/reader/oTq8z3qqpJ5FgEhqV58dIg/2zibv4uGyadl0FDBKvs~6w" target="_self" rel="nofollow noopener noreferrer"&gt;this list&lt;/A&gt;, so it appears I cannot use that component.&amp;nbsp;Let's start simple. How would I use a simple regex to match something from a column in a tFileInputDelimited and cat it to a tLogRow?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 17:57:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287789#M61337</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-19T17:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use REGEX in tJava(row,flex)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287790#M61338</link>
      <description>tExtractRegexFields should support any regex supported by Java's Pattern class.</description>
      <pubDate>Thu, 19 Apr 2018 19:50:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287790#M61338</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2018-04-19T19:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use REGEX in tJava(row,flex)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287791#M61339</link>
      <description>&lt;P&gt;If I use&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(?&amp;lt;=myvalue:)[0-9]*&lt;/PRE&gt;
&lt;P&gt;on data&lt;/P&gt;
&lt;PRE&gt;blah () ; blah, {} words myvalue:42 more data [] 23&lt;/PRE&gt;
&lt;P&gt;in jEdit or elsewhere, it matches "42". Talend is not giving me a match.&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LsKv"&gt;regex_match.PNG&lt;/A&gt;</description>
      <pubDate>Thu, 19 Apr 2018 21:47:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287791#M61339</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-19T21:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use REGEX in tJava(row,flex)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287792#M61340</link>
      <description>&lt;P&gt;Also, if I attempt to match data inside brackets in Talend I am met with an "Invalid escape sequence.." error. This works elsewhere. Please see screenshots.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="invalid_escape_seq.PNG" style="width: 786px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwPb.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152348i8ABCE8EE0BC3AECD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwPb.png" alt="0683p000009LwPb.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="set_match.PNG" style="width: 635px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwhA.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142846i0E663080208A16A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwhA.png" alt="0683p000009LwhA.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 22:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287792#M61340</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-19T22:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to use REGEX in tJava(row,flex)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287793#M61341</link>
      <description>&lt;P&gt;If it is known why these are not working any help would be appreciated. As per the OP, if it is known how to use REGEX in a tJavawhatever component, that information would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 22:40:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287793#M61341</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-19T22:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use REGEX in tJava(row,flex)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287794#M61342</link>
      <description>&lt;P&gt;bump&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 17:19:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287794#M61342</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-20T17:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use REGEX in tJava(row,flex)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287795#M61343</link>
      <description>&lt;P&gt;It works fine with Pattern and Matcher within a tJavaRow component.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I used tRowGenerator to generate one row with your string:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;blah () ; blah, {} words myvalue:42 more data [] 23&lt;/PRE&gt; 
&lt;P&gt;In the tJavaRow, aside from the input and output row code I used the following code as a very rough example:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;Pattern pattern = Pattern.compile("(?&amp;lt;=myvalue:)[0-9]*");
Matcher matcher;

if (pattern.matcher(input_row.Test).find()){
	System.out.println("Row Matched");
}&lt;BR /&gt;else{
	System.out.println("Row not Matched");
}&lt;/PRE&gt; 
&lt;P&gt;Which gave me the following result when I ran the job:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TOS_DI-win-x86_64_2018-04-23_16-42-41.jpg" style="width: 404px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LvIE.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155217i9C941300EC3BC6C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LvIE.jpg" alt="0683p000009LvIE.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Hope this helps..!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 16:44:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-REGEX-in-tJava-row-flex/m-p/2287795#M61343</guid>
      <dc:creator>crt1</dc:creator>
      <dc:date>2018-04-23T16:44:02Z</dc:date>
    </item>
  </channel>
</rss>

