title: Extract digits from a string in Java
body: <p>I have a Java <code>String</code> object. I need to extract only digits from it. I'll give an example:</p>
  
  <p><code>"123-456-789"</code> I want <code>"123456789"</code></p>
  
  <p>Is there a library function that extracts only digits?</p>
  
  <p>Thanks for the answers. Before I try these I need to know if I have to install any additional llibraries?</p>