<?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 Regex Hell help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Regex-Hell-help/m-p/143046#M22417</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sweet. Wish SQL had this...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 May 2009 01:32:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-05-01T01:32:29Z</dc:date>
    <item>
      <title>Regex Hell help</title>
      <link>https://community.qlik.com/t5/QlikView/Regex-Hell-help/m-p/143044#M22415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For some odd reason, it was decided to keep the dates found in electronic contracts embedded in the text of the digital contract, found in a text field. Of course, if the contract is in a different language, you gotta code for that as well. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Better yet, said date follows this format:&lt;/P&gt;&lt;P&gt;&amp;lt;td width="20%"&amp;gt;&lt;BR /&gt; Application Date:&amp;lt;br/&amp;gt;&lt;BR /&gt; Funding Date:&amp;lt;br/&amp;gt;&lt;BR /&gt; Due Date: &amp;lt;br/&amp;gt;&lt;BR /&gt; &amp;lt;/td&amp;gt;&lt;BR /&gt; &amp;lt;td&amp;gt;&lt;BR /&gt; March 17, 2005 &amp;lt;br/&amp;gt;&lt;BR /&gt; March 21, 2005&amp;lt;br/&amp;gt;&lt;BR /&gt; April 11, 2005&amp;lt;br/&amp;gt;&lt;BR /&gt; &amp;lt;/td&amp;gt;&lt;/P&gt;&lt;P&gt;I need to parse out the correct Due Date (in this instance, it's 4/11/2005) somehow.&lt;/P&gt;&lt;P&gt;Tried regular expressions and, as usual, failed to get that engine to do what I want...&lt;/P&gt;&lt;P&gt;select substring(digital_contract_text from '%Due Date:#"(\f|\n|\r| |\t|\v)*\&amp;lt;br\/\&amp;gt;(\f|\n|\r| |\t|\v)*\&amp;lt;\/td\&amp;gt;(\f|\n|\r| |\t|\v)*\&amp;lt;td\&amp;gt;(\f|\n|\r| |\t|\v)*([a-z]| |[A-Z]|,|[0-9])+\&amp;lt;br\/\&amp;gt;(\f|\n|\r| |\t|\v)*([a-z]| |[A-Z]|,|[0-9])+\&amp;lt;br\/\&amp;gt;(\f|\n|\r| |\t|\v)*([a-z]| |[A-Z]|,|[0-9])+#"\&amp;lt;br\/\&amp;gt;%' for '#')&lt;BR /&gt; from table_foo&lt;BR /&gt;where id = 370&lt;/P&gt;&lt;P&gt;Hilariously, if one moves the initial #" anywhere else than where it is already, the query blows up.&lt;/P&gt;&lt;P&gt;How do I go about parsing that DueDate out of that HTML mess?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 21:44:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regex-Hell-help/m-p/143044#M22415</guid>
      <dc:creator />
      <dc:date>2009-04-30T21:44:49Z</dc:date>
    </item>
    <item>
      <title>Regex Hell help</title>
      <link>https://community.qlik.com/t5/QlikView/Regex-Hell-help/m-p/143045#M22416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using function subfield. See attached sample.&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 23:09:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regex-Hell-help/m-p/143045#M22416</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2009-04-30T23:09:48Z</dc:date>
    </item>
    <item>
      <title>Regex Hell help</title>
      <link>https://community.qlik.com/t5/QlikView/Regex-Hell-help/m-p/143046#M22417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sweet. Wish SQL had this...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 May 2009 01:32:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regex-Hell-help/m-p/143046#M22417</guid>
      <dc:creator />
      <dc:date>2009-05-01T01:32:29Z</dc:date>
    </item>
    <item>
      <title>Regex Hell help</title>
      <link>https://community.qlik.com/t5/QlikView/Regex-Hell-help/m-p/143047#M22418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TextBetween() might also be a good approach.&lt;/P&gt;&lt;P&gt;trim(TextBetween(vOriginal, '&amp;lt;br/&amp;gt;', '&amp;lt;', 5));&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 May 2009 02:04:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Regex-Hell-help/m-p/143047#M22418</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-05-01T02:04:49Z</dc:date>
    </item>
  </channel>
</rss>

