<?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: Find first repeated word in text in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Find-first-repeated-word-in-a-text/m-p/1032248#M348389</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really sure about your requirements, but you can look into &lt;STRONG&gt;Index()&lt;/STRONG&gt; function to retrieve the position of a substring found in your text values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Feb 2016 16:49:13 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-02-15T16:49:13Z</dc:date>
    <item>
      <title>Find first repeated word in a text</title>
      <link>https://community.qlik.com/t5/QlikView/Find-first-repeated-word-in-a-text/m-p/1032247#M348388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the table below in .csv format:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Records&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;Spiderman&lt;/SPAN&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;Spiderman&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;-X-Man&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Spiderman&lt;/SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;X-Man&lt;/SPAN&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;Spiderman&lt;/SPAN&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;something-&lt;SPAN style="font-size: 13.3333px;"&gt;something-&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;X-Man-&lt;SPAN style="font-size: 13.3333px;"&gt;something-&lt;SPAN style="font-size: 13.3333px;"&gt;something-&lt;SPAN style="font-size: 13.3333px;"&gt;something-&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to form another column so the result would be like:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Records , TheHero&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;-Spiderman-&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;something , &lt;SPAN style="font-size: 13.3333px;"&gt;Spiderman&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;Spiderman&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;-X-Man , &lt;SPAN style="font-size: 13.3333px;"&gt;Spiderman&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Spiderman&lt;/SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;something , &lt;SPAN style="font-size: 13.3333px;"&gt;Spiderman&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;X-Man&lt;/SPAN&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;something&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;Spiderman&lt;/SPAN&gt;-&lt;SPAN style="font-size: 13.3333px;"&gt;something-&lt;SPAN style="font-size: 13.3333px;"&gt;something-&lt;SPAN style="font-size: 13.3333px;"&gt;something , &lt;SPAN style="font-size: 13.3333px;"&gt;X-Man&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;X-Man-&lt;SPAN style="font-size: 13.3333px;"&gt;something-&lt;SPAN style="font-size: 13.3333px;"&gt;something-&lt;SPAN style="font-size: 13.3333px;"&gt;something-&lt;SPAN style="font-size: 13.3333px;"&gt;something, &lt;SPAN style="font-size: 13.3333px;"&gt;X-Man&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;BR /&gt;The "&lt;SPAN style="font-size: 13.3333px;"&gt;something" &lt;/SPAN&gt;value can be any text and it does not follow a format.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;The ordering of attributes in the field might be different.&lt;/P&gt;&lt;P&gt;I need to find first occurrence of a word (either &lt;SPAN style="font-size: 13.3333px;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Spiderman" or "&lt;SPAN style="font-size: 13.3333px;"&gt;X-Man"&lt;/SPAN&gt;&lt;/SPAN&gt;) from the left.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 04:16:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-first-repeated-word-in-a-text/m-p/1032247#M348388</guid>
      <dc:creator />
      <dc:date>2016-02-15T04:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Find first repeated word in text</title>
      <link>https://community.qlik.com/t5/QlikView/Find-first-repeated-word-in-a-text/m-p/1032248#M348389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really sure about your requirements, but you can look into &lt;STRONG&gt;Index()&lt;/STRONG&gt; function to retrieve the position of a substring found in your text values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 16:49:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-first-repeated-word-in-a-text/m-p/1032248#M348389</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-02-15T16:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Find first repeated word in text</title>
      <link>https://community.qlik.com/t5/QlikView/Find-first-repeated-word-in-a-text/m-p/1032249#M348390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Records,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Len(Trim(SubField(Replace(Replace(Records, 'something', '|'), '-', ''), '|', 1))) &amp;gt; 0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; SubField(Replace(Replace(Records, 'something', '|'), '-', ''), '|', 1),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; SubField(Replace(Replace(Records, 'something', '|'), '-', ''), '|', 2)) as NewRecords;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Records&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;something-Hotman-something-something&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;something-Hotman-something-XMan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hotman-something-something-something&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;XMan-something-Hotman-something-something-something&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;XMan-something-something-something-something&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 16:53:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-first-repeated-word-in-a-text/m-p/1032249#M348390</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-02-15T16:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Find first repeated word in a text</title>
      <link>https://community.qlik.com/t5/QlikView/Find-first-repeated-word-in-a-text/m-p/1032250#M348391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I add more information to the question: &lt;BR /&gt;The "something" can be any text and it does not follow a format, so I can't use replace function. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 22:56:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-first-repeated-word-in-a-text/m-p/1032250#M348391</guid>
      <dc:creator />
      <dc:date>2016-02-15T22:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Find first repeated word in a text</title>
      <link>https://community.qlik.com/t5/QlikView/Find-first-repeated-word-in-a-text/m-p/1032251#M348392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will it always be just two words you are looking for or will there be a variable number of words? If so how many?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 23:11:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-first-repeated-word-in-a-text/m-p/1032251#M348392</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2016-02-15T23:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Find first repeated word in a text</title>
      <link>https://community.qlik.com/t5/QlikView/Find-first-repeated-word-in-a-text/m-p/1032252#M348393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can find the first of a variable number of heros like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14555803594859775" jivemacro_uid="_14555803594859775"&gt;
&lt;P&gt;MAP:&lt;BR /&gt;MAPPING LOAD &lt;BR /&gt; Hero, '\/' &amp;amp; Hero &amp;amp; '/\' as F2&lt;BR /&gt;INLINE [&lt;BR /&gt;Hero&lt;BR /&gt;Hotman&lt;BR /&gt;XMan&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Table:&lt;BR /&gt;LOAD Records,&lt;BR /&gt;&amp;nbsp; TextBetween(MapSubString('MAP',Records), '\/','/\',1) as FirstHero,&lt;BR /&gt;&amp;nbsp; TextBetween(MapSubString('MAP',Records), '\/','/\',2) as SecondHero;&lt;BR /&gt;LOAD * Inline [&lt;BR /&gt;Records&lt;BR /&gt;something-Hotman-something-something&lt;BR /&gt;something-Hotman-something-XMan&lt;BR /&gt;Hotman-something-something-something&lt;BR /&gt;XMan-something-Hotman-something-something-something&lt;BR /&gt;XMan-something-something-something-something&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've used '\/' and '/\' as delimiters for the heros, just use any sequence of characters that won't show up in your "something" text parts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 23:53:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-first-repeated-word-in-a-text/m-p/1032252#M348393</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-02-15T23:53:46Z</dc:date>
    </item>
  </channel>
</rss>

