title: How to filter multiple elements from the list if matching specific pattern?
body: <p>I have list of <code>Work</code> model elements.</p>
  <p>Work has paremeters like:</p>
  <pre><code>id,
  title,
  number,
  version number
  </code></pre>
  <p>I would like to have only Work elements where <code>version number</code> is not null and take the highest <code>version number</code> of existing elements.
  For example my list has Work elements like (in order title, number, version)</p>
  <pre><code>Running (120:1)
  Running (120:2)
  Running (120:3)
  Climbing (55:1)
  Climbing (55:2)
  Climbing (55:3)
  Climbing (55:4)
  </code></pre>
  <p>My result in the list after filters should be</p>
  <pre><code>Running (120:3)
  Climbing (55:4)
  </code></pre>
  <p>My code so far:</p>
  <pre><code>    private fun List&lt;Work&gt;.filterByVersion(): List&lt;Work&gt; {
  
                  work.version_number != null
          }.filter { work -&gt; (&quot;${work.title} ${work.number}:${work.version_number}&quot;).contains(&quot;no idea of regex here&quot;)
       }
      }
  </code></pre>
  <p>I was thinking something like inner search with <code>{work.title} ${work.number}:</code> then find in here the max value of <code>{work.version_number}</code>.</p>