<?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: Regex extract 2 values (dates) from string using tExtractRegExFields in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Regex-extract-2-values-dates-from-string-using/m-p/2214667#M11413</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;Define the tExtractRegexFields schema as:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tExtractRegexFields.PNG" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LuMt.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132670iC7EC750955CCC6EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LuMt.png" alt="0683p000009LuMt.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;and the regex as:&lt;/P&gt; 
&lt;PRE&gt;"(^.*)(\\d{2}-\\D{3}-\\d{4})(.*)(\\d{2}-\\D{3}-\\d{4})(.*$)"&lt;/PRE&gt; 
&lt;P&gt;Here is the result from tLogRow:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="result.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LuOt.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157986i5C66A0631BA0673C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LuOt.png" alt="0683p000009LuOt.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Hope this helps,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2017 13:52:30 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2017-04-19T13:52:30Z</dc:date>
    <item>
      <title>Regex extract 2 values (dates) from string using tExtractRegExFields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Regex-extract-2-values-dates-from-string-using/m-p/2214665#M11411</link>
      <description>&lt;P&gt;I could do with some help with tExtractRegexFields from the community. Given the string below&lt;/P&gt;
&lt;PRE&gt;some text to begin with Start Date : '01-SEP-2016' , End Date : '30-SEP-2016'. Download 30-SEP-16&lt;/PRE&gt;
&lt;P&gt;I want to extract Start Date and End Date values. I have the following RegEx&lt;/P&gt;
&lt;PRE&gt;"(\\d{2}-\\D{3}-\\d{4})"&lt;/PRE&gt;
&lt;P&gt;which &lt;STRONG&gt;will&lt;/STRONG&gt; extract "a valid value"&amp;nbsp;but doesn't extract both dates (&lt;EM&gt;I'm doing further processing to get the download date&lt;/EM&gt;). My output schema is a generic schema of 2 nullable strings but only the 2nd value is extracted and stored in the 1st schema position.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I use&amp;nbsp;&lt;A href="http://regexr.com/" target="_self" rel="nofollow noopener noreferrer"&gt;http://regexr.com/&lt;/A&gt;&amp;nbsp;and remove the escape "\" chars the regex above &amp;nbsp;becomes&lt;/P&gt;
&lt;PRE&gt;(\d{2}-\D{3}-\d{4})&lt;/PRE&gt;
&lt;P&gt;and will highlight both matching dates which seems to imply the regex is valid for both date values, it just won't extract both values.&lt;/P&gt;
&lt;P&gt;Can anyone provide me with some pointers to capture the 1st and 2nd dates and store them in the correct positions in the output ?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 12:22:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Regex-extract-2-values-dates-from-string-using/m-p/2214665#M11411</guid>
      <dc:creator>mobmsc2</dc:creator>
      <dc:date>2017-04-19T12:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Regex extract 2 values (dates) from string using tExtractRegExFields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Regex-extract-2-values-dates-from-string-using/m-p/2214666#M11412</link>
      <description>&lt;P&gt;The following regex strings either generate an error or don't extract both dates&lt;/P&gt;&lt;PRE&gt;"(\\d{2}-\\D{3}-\\d{4})&lt;STRONG&gt;.&lt;/STRONG&gt;(\\d{2}-\\D{3}-\\d{4})"&lt;BR /&gt;"\\+(\\d{2}-\\D{3}-\\d{4})"&lt;BR /&gt;"(\\d{2}-\\D{3}-\\d{4})//g"&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Apr 2017 13:47:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Regex-extract-2-values-dates-from-string-using/m-p/2214666#M11412</guid>
      <dc:creator>mobmsc2</dc:creator>
      <dc:date>2017-04-19T13:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Regex extract 2 values (dates) from string using tExtractRegExFields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Regex-extract-2-values-dates-from-string-using/m-p/2214667#M11413</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;Define the tExtractRegexFields schema as:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tExtractRegexFields.PNG" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LuMt.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132670iC7EC750955CCC6EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LuMt.png" alt="0683p000009LuMt.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;and the regex as:&lt;/P&gt; 
&lt;PRE&gt;"(^.*)(\\d{2}-\\D{3}-\\d{4})(.*)(\\d{2}-\\D{3}-\\d{4})(.*$)"&lt;/PRE&gt; 
&lt;P&gt;Here is the result from tLogRow:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="result.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LuOt.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157986i5C66A0631BA0673C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LuOt.png" alt="0683p000009LuOt.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Hope this helps,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 13:52:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Regex-extract-2-values-dates-from-string-using/m-p/2214667#M11413</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-04-19T13:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Regex extract 2 values (dates) from string using tExtractRegExFields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Regex-extract-2-values-dates-from-string-using/m-p/2214668#M11414</link>
      <description>&lt;P&gt;Thanks the&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;.*&lt;/PRE&gt; 
&lt;P&gt;you had inside the capture group to extract the middle text (which I'm reading as zero or more characters) was what I needed followed by the Date extractor again which gave me&lt;/P&gt; 
&lt;PRE&gt;"(\\d{2}-\\D{3}-\\d{4}).*(\\d{2}-\\D{3}-\\d{4})"&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Apr 2017 14:01:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Regex-extract-2-values-dates-from-string-using/m-p/2214668#M11414</guid>
      <dc:creator>mobmsc2</dc:creator>
      <dc:date>2017-04-19T14:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Regex extract 2 values (dates) from string using tExtractRegExFields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Regex-extract-2-values-dates-from-string-using/m-p/2214669#M11415</link>
      <description>&lt;P&gt;Well that escalated quickly. &amp;nbsp;I missed three replies while typing my own!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 14:04:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Regex-extract-2-values-dates-from-string-using/m-p/2214669#M11415</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2017-04-19T14:04:42Z</dc:date>
    </item>
  </channel>
</rss>

