title: Extract leading numbers from a string in batch script
body: <p>I am new to batch scripting. although i have shell and python solutions for this problem but got stuck in batch script.</p>
  
  <p>I have string like <code>123_happy</code>, <code>234.healthy</code>, <code>3456wealthy</code> etc.</p>
  
  <p>I want to extract the leading numbers from each string. the only pattern here is that all these strings contain numbers in the beginning.</p>
  
  <p>I can't use echo <code>%str:~0,3%</code> as it doesn't fulfill my requirement.  </p>