title: How can I select the last paragraph "Summary" dynamically from a log file?
body: <p>I want to select all the details from the last &quot;Summary&quot; into a paragraph from a log file.
  For my current regex I select the first &quot;Summary&quot; group of details.
  You can see my example here: <a href="https://regex101.com/r/U8kTa1/1" rel="nofollow noreferrer">https://regex101.com/r/U8kTa1/1</a></p>
  <pre><code>\bMessage[^\:]+:\s(?&lt;LogEntryDate&gt;[\d\-]+\s[\d\:]+):\s(?:Beginning|\&lt;\-\sclsAAProxy)(?:[^{]+(?:{(?!Summary\s:\s(?=\(Total))[^{]+)+)*?{Summary\s:\s(?:(?&lt;Summary&gt;(?&lt;keyval&gt;\((?&lt;key&gt;[^=]+)\s=\s(?&lt;value&gt;[^)]+)\))+)})(?&gt;[^N]+(?:N(?!ext)[^N]+)*)\bNext\b\s[^\d]+(?&lt;ReqNumber&gt;\d+)\sis\s(?&lt;NextRunDate&gt;[\d\-]+\s[\d\:]+)
  </code></pre>
  <p>In this moment from my log I succeeded to select this part:</p>
  <pre><code>(Total Scanned Files = 0)(Start Time = 9/6/2021 12:16:12 PM)(End Time = 9/6/2021 12:16:12 PM)(Total Time = 0h 0m 0s) 
  </code></pre>
  <p>But what I need is to select the last &quot;Summary&quot; with 8 tags details (instead of 4):</p>
  <pre><code>(Command ScanPath = c:\testdata\STD_1\)(Total Scanned Files = 0)(Total Archived Files = 12)(Total Bytes = 819816)(Start Time = 9/6/2021 12:16:12 PM)(End Time = 9/6/2021 12:16:12 PM)(Total Time = 0h 0m 0s)(Errors = 0)
  </code></pre>
  <p>If it helps I can selected until I find &quot;Errors&quot; string, but sometimes the paragraph doesn't have that word &quot;Errors&quot;. In my log file I have 3 groups of paragraph, I want to select in each paragraph as you see into my regex the last &quot;Summary&quot;.</p>