title: Extract number from string using regex in java
body: <p>I fail to extract a (double) number from a pre-defined input String using a regular expression.<br>
  The String is:</p>
  
  <pre><code>String inputline ="Neuer Kontostand";"+2.117,68";
  </code></pre>
  
  <p>For successfully parsing just the number I need to suppress the leading <code>+</code> while keeping an optional <code>-</code>. In addition I must cut off the <code>"</code> before/after the number.</p>
  
  <p>Of course I could do multi-step string-operations, but does anyone know how to do all in a more elegant way using one regular expression?</p>
  
  <p>What I tried so far:</p>
  
  <pre><code>Pattern p = Pattern.compile("-{0,1}[0-9.,]*");
  Matcher m = p.matcher(inputline);
  String substring =m.group();
  </code></pre>