title: Facing odd behaviour with Long.parseLong()
body: <p>I'm facing a pretty strange behaviour with <code>Long.parseLong()</code> method while trying to extract a number out of a string.</p>
  
  <p>The string contains multiple numbers but only one (which I need) is within question marks, so I extract it using regex and then I try to parse the 15 digits number into a long variable:</p>
  
  <pre><code>    Pattern p = Pattern.compile("\"\\d+\"");
      Matcher m = p.matcher(myString);
      while (m.find()) {
          String var1 = m.group();
          var1 = var1.replace("\"", "");
  
          try {
              long var2 = Long.parseLong(var1);
              return var2;
          }
          catch (Exception e) {
              return -1L;
          }
      }
      return 0L;
  </code></pre>
  
  <p>Although I expect it to return <code>var2</code> or throw an exception, the next line that's being called after <code>Long.parseLong(var1)</code> is <code>return 0L</code> and I have no idea why. Am I missing something?</p>
  
  <p>Thanks.</p>