title: Why sed command doesn't work trying to extract scala version number
body: <p>I am trying to extract Scala major version using <code>sed</code> but it returns the same string back. I am not sure.</p>
  <p>scala version:</p>
  <pre><code>scala -version
  &gt; Scala code runner version 2.13.7 -- Copyright 2002-2021, LAMP/EPFL and Lightbend, Inc.
  </code></pre>
  <p>Tried <code>sed</code> command is:</p>
  <pre><code>scala -version | sed 's/.*version \([0-9]*\.[0-9]*\).*/\1/'
  &gt; Scala code runner version 2.13.7 -- Copyright 2002-2021, LAMP/EPFL and Lightbend, Inc.
  </code></pre>
  <p>Screenshot:
  <a href="https://i.stack.imgur.com/MF3eH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MF3eH.png" alt="enter image description here" /></a></p>
  <p>But when I test my regex using <a href="https://sed.js.org/#" rel="nofollow noreferrer">this website</a> which is a sed playground it works.</p>