<?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: [resolved] Tmap and substring function in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Tmap-and-substring-function/m-p/2289192#M62596</link>
    <description>I'm glad it's working 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133049iD780B7DE0116E4D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACJ.png" alt="0683p000009MACJ.png" /&gt;&lt;/span&gt;</description>
    <pubDate>Mon, 01 Aug 2011 14:06:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-08-01T14:06:01Z</dc:date>
    <item>
      <title>[resolved] Tmap and substring function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Tmap-and-substring-function/m-p/2289189#M62593</link>
      <description>Hi all,
&lt;BR /&gt;I have tmap. The input is coming in one string as follows:
&lt;BR /&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;bbasasas&amp;lt;/title&amp;gt;&amp;lt;body&amp;gt;dasdad&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;
&lt;BR /&gt;What I am interested in is to get everything between &amp;lt;body&amp;gt; &amp;lt;/body&amp;gt; tags
&lt;BR /&gt;so I am trying to do the following expression:
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;input.htmlstring.substring(input.htmlstring.indexOf("&amp;lt;body&amp;gt;"), input.htmlstring.indexOf("&amp;lt;/body&amp;gt;"))&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Now, for some reason I get the follow error:
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;java.lang.StringIndexOutOfBoundsException: String index out of range: -1&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Any idea where I am going wrong? Thanks.</description>
      <pubDate>Sat, 16 Nov 2024 12:46:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Tmap-and-substring-function/m-p/2289189#M62593</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Tmap and substring function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Tmap-and-substring-function/m-p/2289190#M62594</link>
      <description>Hi,
&lt;BR /&gt;I don't know what you did wrong, but I tried it in my talend version.
&lt;BR /&gt;Maybe I did it difficult because i couldn't find a substring function in my talend version, but I got it working.
&lt;BR /&gt;So I made 2 variables in my tMap component: htmlRight and htmlLeft.
&lt;BR /&gt;htmlright contains:
&lt;BR /&gt;StringHandling.RIGHT(Input.htmlstring,(StringHandling.LEN(Input.htmlstring) - StringHandling.INDEX(Input.htmlstring ,"&amp;lt;body&amp;gt;")-6))
&lt;BR /&gt;htmlleft contains:
&lt;BR /&gt;StringHandling.LEFT(Var.htmlright,(StringHandling.LEN("Var.htmlright") - StringHandling.INDEX(Var.htmlright ,"&amp;lt;/body&amp;gt;")-1))
&lt;BR /&gt;The variable htmlleft then contains what is between the body tags.
&lt;BR /&gt;Regards,
&lt;BR /&gt;Mario De Pauw</description>
      <pubDate>Mon, 01 Aug 2011 13:11:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Tmap-and-substring-function/m-p/2289190#M62594</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-01T13:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Tmap and substring function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Tmap-and-substring-function/m-p/2289191#M62595</link>
      <description>it was some problem with my installation. once I restarted it, all worked fine &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Thanks for your help</description>
      <pubDate>Mon, 01 Aug 2011 13:51:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Tmap-and-substring-function/m-p/2289191#M62595</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-01T13:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Tmap and substring function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Tmap-and-substring-function/m-p/2289192#M62596</link>
      <description>I'm glad it's working 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133049iD780B7DE0116E4D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACJ.png" alt="0683p000009MACJ.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Mon, 01 Aug 2011 14:06:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Tmap-and-substring-function/m-p/2289192#M62596</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-01T14:06:01Z</dc:date>
    </item>
  </channel>
</rss>

