<?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 extracting  a code(of variable length) after a character and before a string in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/extracting-a-code-of-variable-length-after-a-character-and/m-p/625917#M230157</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt; I have URLs like the following that I need to extract the code after the last '/' and before the '-4.html' in the load script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; /history/2/&lt;STRONG&gt;52557&lt;/STRONG&gt;-4.html&amp;nbsp;&amp;nbsp; -&amp;gt; want to return 52557&lt;/P&gt;&lt;P&gt; /abc/xyz/11/&lt;STRONG&gt;3&lt;/STRONG&gt;-4.html&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; want to return 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: arial, helvetica, sans-serif;"&gt; I tried: TextBetween(MyString,'/','-4.html')&amp;nbsp; and it's returning the text between the first '/' rather than the last.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #333333;"&gt;I also tried: TextBetween(right(&lt;SPAN style="color: #333333;"&gt;MyString&lt;/SPAN&gt;,15),'/','-4.html'), but since the code can be variable length, I'm not sure how to not capture other preceding '/' with the right() function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #333333;"&gt;Appreciate the help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #333333;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #333333;"&gt;-Ming&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Apr 2014 23:23:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-04-10T23:23:55Z</dc:date>
    <item>
      <title>extracting  a code(of variable length) after a character and before a string</title>
      <link>https://community.qlik.com/t5/QlikView/extracting-a-code-of-variable-length-after-a-character-and/m-p/625917#M230157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt; I have URLs like the following that I need to extract the code after the last '/' and before the '-4.html' in the load script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; /history/2/&lt;STRONG&gt;52557&lt;/STRONG&gt;-4.html&amp;nbsp;&amp;nbsp; -&amp;gt; want to return 52557&lt;/P&gt;&lt;P&gt; /abc/xyz/11/&lt;STRONG&gt;3&lt;/STRONG&gt;-4.html&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; want to return 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: arial, helvetica, sans-serif;"&gt; I tried: TextBetween(MyString,'/','-4.html')&amp;nbsp; and it's returning the text between the first '/' rather than the last.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #333333;"&gt;I also tried: TextBetween(right(&lt;SPAN style="color: #333333;"&gt;MyString&lt;/SPAN&gt;,15),'/','-4.html'), but since the code can be variable length, I'm not sure how to not capture other preceding '/' with the right() function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #333333;"&gt;Appreciate the help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #333333;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #333333;"&gt;-Ming&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 23:23:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extracting-a-code-of-variable-length-after-a-character-and/m-p/625917#M230157</guid>
      <dc:creator />
      <dc:date>2014-04-10T23:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: extracting  a code(of variable length) after a character and before a string</title>
      <link>https://community.qlik.com/t5/QlikView/extracting-a-code-of-variable-length-after-a-character-and/m-p/625918#M230158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ming,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following should do the trick:&lt;/P&gt;&lt;P&gt;TextBetween(URL, '/', '-4', SubStringCount(URL, '/'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 01:07:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extracting-a-code-of-variable-length-after-a-character-and/m-p/625918#M230158</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2014-04-11T01:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: extracting  a code(of variable length) after a character and before a string</title>
      <link>https://community.qlik.com/t5/QlikView/extracting-a-code-of-variable-length-after-a-character-and/m-p/625919#M230159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rakesh, that worked perfectly. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 04:32:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extracting-a-code-of-variable-length-after-a-character-and/m-p/625919#M230159</guid>
      <dc:creator />
      <dc:date>2014-04-11T04:32:57Z</dc:date>
    </item>
  </channel>
</rss>

