title: Extract Number from string into a list in Scala
body: <p>I have the following string :</p>
  
  <pre><code>var myStr = "abc12ef4567gh90ijkl789"
  </code></pre>
  
  <p>The size of the list is not fixed and it contains number in between. I want to extract the numbers and store them in the form of a list in this manner:</p>
  
  <pre><code>List(12,4567,90,789)
  </code></pre>
  
  <p>I tried the solution mentioned <a href="https://stackoverflow.com/questions/40459723/extract-numbers-from-string-array">here</a> but cannot extend it to my case. I just want to know if there is any faster or efficient solution instead of just traversing the string and extracting the numbers one by one using brute force ? Also, the string can be arbitrary length.</p>