title: Using awk to grab only numbers from a string
body: <p>Background:<br>
  I have a column that <em>should</em> get user input in form of "Description text ref12345678". I have existing scripts that grab the reference number but unfortunately some users add it incorrectly so instead of <code>"ref12345678"</code> it can be <code>"ref 12345678"</code>, <code>"RF12345678"</code>, <code>"abcd12345678"</code> or any variation. Naturally the wrong formatting breaks some of the triggered scripts. 
  For now I can't control the user input to this field, so I want to make the scripts later in the pipeline just to get the number.</p>
  
  <p>At the moment I'm stripping the letters with <code>awk '{gsub(/[[:alpha:]]/, "")}; 1'</code>, but substitution seems like an inefficient solution. (I know I can do this also with <code>sed -n 's/.*[a-zA-Z]//p'</code> and <code>tr -d '[[:alpha:]]'</code> but they are essentially the same and I want awk for additional programmability).</p>
  
  <p>The question is, is there a way to set awk to either print only numbers from a string, or set delimits to numeric items in a string? (or is substitution really the most efficient solution for this problem).  </p>
  
  <p>So in summary: how do I use awk for <code>$ echo "ref12345678"</code> to print only "12345678" without substitution?</p>