<?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: Extract A Sentence Without The Last Word in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Extract-A-Sentence-Without-The-Last-Word/m-p/92145#M754204</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try Subfield('This is a sentence', Subfield('This is a sentence', ' ',-1), 1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Oct 2018 13:46:58 GMT</pubDate>
    <dc:creator>antose</dc:creator>
    <dc:date>2018-10-10T13:46:58Z</dc:date>
    <item>
      <title>Extract A Sentence Without The Last Word</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-A-Sentence-Without-The-Last-Word/m-p/92144#M754203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I should probably know how to do this but my brain's gone numb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need all but the last word of a sentence. &lt;/P&gt;&lt;P&gt;For example if i have a sentence...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;This is a sentence&lt;/STRONG&gt; then i need just the &lt;STRONG style="color: #ff0000;"&gt;This is a&lt;/STRONG&gt; part&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the sentence could have any number of spaces in it and i just need to lose the last word of it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Here is a slightly longer sentence&lt;/STRONG&gt;&lt;/SPAN&gt; would leave me with &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Here is a slightly longer&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-A-Sentence-Without-The-Last-Word/m-p/92144#M754203</guid>
      <dc:creator>haymarketpaul</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Extract A Sentence Without The Last Word</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-A-Sentence-Without-The-Last-Word/m-p/92145#M754204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try Subfield('This is a sentence', Subfield('This is a sentence', ' ',-1), 1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2018 13:46:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-A-Sentence-Without-The-Last-Word/m-p/92145#M754204</guid>
      <dc:creator>antose</dc:creator>
      <dc:date>2018-10-10T13:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Extract A Sentence Without The Last Word</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-A-Sentence-Without-The-Last-Word/m-p/92146#M754205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;Left('Here is a slightly longer sentence',Index('Here is a slightly longer sentence', ' ', -1)-1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2018 13:48:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-A-Sentence-Without-The-Last-Word/m-p/92146#M754205</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2018-10-10T13:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Extract A Sentence Without The Last Word</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-A-Sentence-Without-The-Last-Word/m-p/92147#M754206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Both for the replies&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For reasons I can't accurately explain Anders solution didn't quite work for all scenarios but Dilip's was fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg&lt;/P&gt;&lt;P&gt;One of my sentences said the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aecom and pelli clarke pelli&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anders solution produced:&amp;nbsp;&amp;nbsp; aecom and&lt;/P&gt;&lt;P&gt;whilst Dilip's produced:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; aecom and pelli clarke&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There seem to be a few that seem to be like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway interesting and many thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2018 14:03:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-A-Sentence-Without-The-Last-Word/m-p/92147#M754206</guid>
      <dc:creator>haymarketpaul</dc:creator>
      <dc:date>2018-10-10T14:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Extract A Sentence Without The Last Word</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-A-Sentence-Without-The-Last-Word/m-p/92148#M754207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anders solution is retrieving the last word using the second subfield() and uses this as separator for the first subfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should work as long as the last word does not repeat in the sentence (like pelli occurs twice in your sample).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence better use Dilip's solution which relies only on space as separator, which is the separator in your original requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2018 14:42:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-A-Sentence-Without-The-Last-Word/m-p/92148#M754207</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-10-10T14:42:49Z</dc:date>
    </item>
  </channel>
</rss>

