<?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: Regular Expression in Java tMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Regular-Expression-in-Java-tMap/m-p/2212841#M10330</link>
    <description>Based on the following post, I should be created custom routine it seems. 
&lt;BR /&gt; 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCsu0CAC" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/resolved-How-to-extract-substrings-according-to-regex-pattern-in/td-p/60339&lt;/A&gt;</description>
    <pubDate>Wed, 01 Aug 2012 12:55:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-08-01T12:55:13Z</dc:date>
    <item>
      <title>Regular Expression in Java tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Regular-Expression-in-Java-tMap/m-p/2212840#M10329</link>
      <description>Hello All,
&lt;BR /&gt;I am looking for a way to use Regular Expression inside tMap, so that I can use parse my log file which has schema which is dynamic
&lt;BR /&gt;--loc=us --tool=env --binary=/i686-pc-linux2.4/bin/env
&lt;BR /&gt;--loc=us --binary=/i686-pc-linux2.4/bin/rm --tool=rm
&lt;BR /&gt;--binary=/i686-pc-linux2.4/bin/grep --loc=us --tool=grep
&lt;BR /&gt;--loc=us --tool=mv
&lt;BR /&gt;I tried to understand how to extract text using Regular Expression inside java tMap expression editor. How can I call "--loc=(.+?) " inside tMap considering I have the log defined as delimitedfile.
&lt;BR /&gt;Thanks in advance for your help.
&lt;BR /&gt;Regards,
&lt;BR /&gt;Sathish</description>
      <pubDate>Wed, 01 Aug 2012 12:26:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Regular-Expression-in-Java-tMap/m-p/2212840#M10329</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-01T12:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression in Java tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Regular-Expression-in-Java-tMap/m-p/2212841#M10330</link>
      <description>Based on the following post, I should be created custom routine it seems. 
&lt;BR /&gt; 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCsu0CAC" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/resolved-How-to-extract-substrings-according-to-regex-pattern-in/td-p/60339&lt;/A&gt;</description>
      <pubDate>Wed, 01 Aug 2012 12:55:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Regular-Expression-in-Java-tMap/m-p/2212841#M10330</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-01T12:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression in Java tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Regular-Expression-in-Java-tMap/m-p/2212842#M10331</link>
      <description>Hello All,&lt;BR /&gt;I had to write the following routine&lt;BR /&gt;&lt;PRE&gt;package routines;&lt;BR /&gt;import java.util.regex.Matcher;&lt;BR /&gt;import java.util.regex.Pattern;&lt;BR /&gt;public class MyRegExp {&lt;BR /&gt;    public static String loc(String str) {&lt;BR /&gt;		  Pattern p = Pattern.compile("(?-m)--loc=(.+?)(\\s|$)");&lt;BR /&gt;		  Matcher m = p.matcher(str);&lt;BR /&gt;		  if (m.find()) {&lt;BR /&gt;			  return m.group(1);&lt;BR /&gt;		  } else {&lt;BR /&gt;			  return null;&lt;BR /&gt;		  }&lt;BR /&gt;    }&lt;BR /&gt;    &lt;BR /&gt;    public static String tool(String str) {    &lt;BR /&gt;		  Pattern p = Pattern.compile("(?-m)--tool=(.+?)(\\s|$)");&lt;BR /&gt;		  Matcher m = p.matcher(str);&lt;BR /&gt;		  if (m.find()) {&lt;BR /&gt;			  return m.group(1);&lt;BR /&gt;		  } else {&lt;BR /&gt;			  return null;&lt;BR /&gt;		  }&lt;BR /&gt;    }&lt;BR /&gt;    public static String binary(String str) {    &lt;BR /&gt;		  Pattern p = Pattern.compile("(?-m)--binary=(.+?)(\\s|$)");&lt;BR /&gt;		  Matcher m = p.matcher(str);&lt;BR /&gt;		  if (m.find()) {&lt;BR /&gt;			  return m.group(1);&lt;BR /&gt;		  } else {&lt;BR /&gt;			  return null;&lt;BR /&gt;		  }&lt;BR /&gt;    }&lt;BR /&gt;}&lt;/PRE&gt;&lt;BR /&gt;Please let me know if know a better way.&lt;BR /&gt;Regards,&lt;BR /&gt;Sathish</description>
      <pubDate>Wed, 01 Aug 2012 19:05:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Regular-Expression-in-Java-tMap/m-p/2212842#M10331</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-01T19:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression in Java tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Regular-Expression-in-Java-tMap/m-p/2212843#M10332</link>
      <description>You could do it directly in a tMap expression but your way is, I think, better e.g. 
&lt;BR /&gt;row1.columnName.matches("(^|.*\\s)--foo=+(\\s.*|$)")?row1.columnName.replaceAll("(^|.*\\s)--foo=(+)(\\s.*|$)","$2"):null</description>
      <pubDate>Thu, 02 Aug 2012 02:00:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Regular-Expression-in-Java-tMap/m-p/2212843#M10332</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2012-08-02T02:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression in Java tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Regular-Expression-in-Java-tMap/m-p/2212844#M10333</link>
      <description>Je vous laisse découvrir un aperçu du reportage et de cette séance photo de couple, et je remercie encore Antonina et Aurélien pour leur sympathie et 
&lt;A href="http://www.robemariageonline.com" target="_blank" rel="nofollow noopener noreferrer"&gt;Boutique de mariage en ligne&lt;/A&gt; la grande confiance qu?ils m?ont accordé ! 
&lt;BR /&gt;Le loft à Coubevoie - 24, rue Pierre Brossolette 92250 
&lt;A href="http://www.robemariageonline.com" target="_blank" rel="nofollow noopener noreferrer"&gt;robemariageonline.com&lt;/A&gt; La Garenne Colombes/ Courbevoie - 
&lt;A href="http://www.leloft.fr/Leloft/leloft-location-accueil.html" target="_blank" rel="nofollow noopener noreferrer"&gt;www.leloft.fr/Leloft/leloft-location-accueil.html&lt;/A&gt; 
&lt;BR /&gt;Les bonnes adresses du mariage :</description>
      <pubDate>Fri, 03 Aug 2012 04:00:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Regular-Expression-in-Java-tMap/m-p/2212844#M10333</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-08-03T04:00:16Z</dc:date>
    </item>
  </channel>
</rss>

