<?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: Regular expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440284#M611846</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;take a look at this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/170591"&gt;Regular expression [A-Z] *&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to use macros &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Nov 2017 15:19:18 GMT</pubDate>
    <dc:creator>YoussefBelloum</dc:creator>
    <dc:date>2017-11-08T15:19:18Z</dc:date>
    <item>
      <title>Regular expression</title>
      <link>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440283#M611844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I build a regular expression that I want to use in Qlikview &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regular expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;^(?P&amp;lt;sector&amp;gt;CL|LI|HC|CRS|GBL|TEST)?\s*(?P&amp;lt;country&amp;gt;[A-Z]{2}|MULTI|TEST)?\s*(?P&amp;lt;date&amp;gt;\d{8})?\s*(?P&amp;lt;bgcat&amp;gt;[A-Z]{4,6})?\s*(?P&amp;lt;asset&amp;gt;[A-Z]{2})?\s*(?P&amp;lt;type&amp;gt;[A-Z]{4,5})?\s*(?P&amp;lt;subtype&amp;gt;(Cross sell|Test drivers|[A-Za-z&amp;amp;]+))?\s*(?P&amp;lt;name&amp;gt;.*?)?\s*(?P&amp;lt;ticket&amp;gt;#?[a-zA-Z]{3}-\d{3}-\d{5})?$&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For names like this, example name: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CL RU 20161017 CRBCRC CA CLCP Welcome #LGJ-309-18486&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i run this regular expression on &lt;A href="https://regex101.com/" style="font-size: 10pt;" title="https://regex101.com/"&gt;https://regex101.com/&lt;/A&gt; &lt;SPAN style="font-size: 13.3333px;"&gt;it will result in a split like on the below image:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;IMG alt="Regular expression.PNG" class="jive-image image-1" src="/legacyfs/online/182562_Regular expression.PNG" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;My goal is to use this expression in Qlikview to store the matched values in different fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g. store the 'CL' value in the Group Sector field &lt;/P&gt;&lt;P&gt;Store the 'RU' value in the country field&lt;/P&gt;&lt;P&gt;Etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, can Qlikview handle regular expressions, i couldn't find how to use them and in case not, what is then possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2017 15:16:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440283#M611844</guid>
      <dc:creator>twanqlik</dc:creator>
      <dc:date>2017-11-08T15:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression</title>
      <link>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440284#M611846</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;take a look at this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/170591"&gt;Regular expression [A-Z] *&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to use macros &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2017 15:19:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440284#M611846</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2017-11-08T15:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression</title>
      <link>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440285#M611848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be look here (if you have not already)&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-4587"&gt;How to use regular expressions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/170591"&gt;Regular expression [A-Z] *&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2017 15:20:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440285#M611848</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-08T15:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression</title>
      <link>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440286#M611849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think it is a macro... I think it is a user created function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2017 15:21:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440286#M611849</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-08T15:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression</title>
      <link>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440287#M611850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on the complexity of writing a regular expressions with the functions as shared i decided to try another way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With using a combination of Subfield, len and findoneof I'm almost there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm only struggling with one part, maybe you have an idea about this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Input&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CL RU 20161017 CRBCRC CA CLCP Welcome #&lt;STRONG&gt;LGJ-309-18486&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Output (ticketnr)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;#&lt;STRONG&gt;LGJ-309-18486&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Input&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CL BG 20161121 CRBCRC CA CLCP Birthday Campaign&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Output (ticketnr)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;BLANK&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence, I want to extract the ticketnr from the name in case there is a ticketnr.&lt;/P&gt;&lt;P&gt;A ticketnr has always 2 delimiters 2 x -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example ticketnr's:&lt;/P&gt;&lt;P&gt;#LGJ-309-18486&lt;/P&gt;&lt;P&gt;LGJ-309-18486&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea how to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 13:10:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440287#M611850</guid>
      <dc:creator>twanqlik</dc:creator>
      <dc:date>2017-11-09T13:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression</title>
      <link>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440288#M611851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share what you have so far?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 13:12:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440288#M611851</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-09T13:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression</title>
      <link>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440289#M611852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes of course, please find attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 13:15:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440289#M611852</guid>
      <dc:creator>twanqlik</dc:creator>
      <dc:date>2017-11-09T13:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression</title>
      <link>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440290#M611853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if this completely meet your need but see this to get ticket&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Name as Name_old,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Trim(Mid(Name, Index(Name, '-')-4)) as Tickect&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Name.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/182724_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 13:26:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440290#M611853</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-09T13:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression</title>
      <link>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440291#M611854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is assuming that the ticket number is always like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;xxx-xxx-xxxxx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;xxx-xxx-xxxxx&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it is always around the end... We can relax this condition if the first condition is still true, by using this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Name as Name_old,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Trim(Mid(Name, Index(Name, '-')-4&lt;SPAN style="color: #ff0000;"&gt;, 14&lt;/SPAN&gt;)) as Tickect&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Name.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 13:29:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440291#M611854</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-09T13:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression</title>
      <link>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440292#M611855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, this did help me to finalize the script for this section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've uploaded my file, maybe it can also help other developers in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you are interested, could you please have a look at my script, maybe you have some ideas to improve the script for better performance. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 15:19:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regular-expression/m-p/1440292#M611855</guid>
      <dc:creator>twanqlik</dc:creator>
      <dc:date>2017-11-09T15:19:27Z</dc:date>
    </item>
  </channel>
</rss>

