<?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: Map Substring Extra Spaces in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Map-Substring-Extra-Spaces/m-p/1390701#M817944</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow. Didn't think that it would be that simple. Thank you so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Aug 2017 09:14:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-08-28T09:14:45Z</dc:date>
    <item>
      <title>Map Substring Extra Spaces</title>
      <link>https://community.qlik.com/t5/QlikView/Map-Substring-Extra-Spaces/m-p/1390699#M817942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, apologies, I'm been using Qlikview for 3 months so this question may seem daft. I asked an earlier question about using map substring to match a string column to a list of keywords and they're corresponding segment. My next (and hopefully) last question is can map substring deal with extra spaces at the end of a string patter. See the code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;MapTable_Key_1:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Mapping&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Pattern&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'{&amp;lt;'&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Seg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;'&amp;gt;}' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Seg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; Pattern,Seg&lt;BR /&gt; 'PATTERN_1A',SEGMENT1&lt;BR /&gt; 'PATTERN_1B ',SEGMENT1&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;TAB:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; *,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TextBetween&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MapSubString&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('MapTable_Key_1',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Field&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),'{&amp;lt;','&amp;gt;}')) &amp;gt; 0, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TextBetween&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MapSubString&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('MapTable_Key_1',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Field&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),'{&amp;lt;','&amp;gt;}'), 'OTHERS') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Segment&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; Field&lt;BR /&gt; Text and Text and PATTERN_2A and More Text PATTERN_1A&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt; Text and Text and fPATTERN_1Bf and More Text&lt;/SPAN&gt;&lt;BR /&gt; Text and Text and and More Text PATTERN_2A&lt;BR /&gt; Something Else]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;In the underlined line above, I would prefer this string to be matched to "OTHERS" as it does not contain "PATTERN_1A" or "PATTERN_1B ". Notice the extra space at the end of the latter string. Is it possible for the mapping table to recognise the extra space? At the moment it seems to be ignoring the extra space and assigning "SEGMENT_1" to this string.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks to everyone on this community page for helping me so far with my learning of Qlikview.&lt;/SPAN&gt;&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/Map-Substring-Extra-Spaces/m-p/1390699#M817942</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Map Substring Extra Spaces</title>
      <link>https://community.qlik.com/t5/QlikView/Map-Substring-Extra-Spaces/m-p/1390700#M817943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try setting system variable (beginning of the script) like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set Verbatim = 1 ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/174837_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/SystemVariables/Verbatim.htm" title="http://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/SystemVariables/Verbatim.htm"&gt;Verbatim ‒ QlikView&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 09:10:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Map-Substring-Extra-Spaces/m-p/1390700#M817943</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2017-08-28T09:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Map Substring Extra Spaces</title>
      <link>https://community.qlik.com/t5/QlikView/Map-Substring-Extra-Spaces/m-p/1390701#M817944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow. Didn't think that it would be that simple. Thank you so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 09:14:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Map-Substring-Extra-Spaces/m-p/1390701#M817944</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-28T09:14:45Z</dc:date>
    </item>
  </channel>
</rss>

