title: Regex - Find all the digits that occur to a certain character
body: <p>I would like to ask you about regex expression - I need to get all numbers that occur to a certain character. For example:</p>
  <pre><code>&quot;$z4~min.~00~s&quot; -&gt; 4
  &quot;$z12~min.~00~s&quot; -&gt; 12
  </code></pre>
  <p>I simply need first number in the string, I don't need numbers after dot in the string.</p>
  <p>I am using Java for this project.</p>
  <p>Do you have any suggestions? Thanks a lot.</p>