title: Ignoring letters when parsing a double from a line in a file
body: <p>I am trying to import some data from a file line by line. One specific line I was to read from may or may not have "kB" (kiloBytes) at the end and I want to parse the double that is in this line but my program gives me java.lang.NumberFormatException.</p>
  
  <pre><code>    while(inputStream.hasNextLine())
      {
          inputStream.nextLine(); // Skips a line between each object
          String sn = inputStream.nextLine();
          String sa = inputStream.nextLine();
          double ss = Double.parseDouble(inputStream.nextLine()); // This is where the problem occurs
          int sd    = Integer.parseInt(inputStream.nextLine());
          addSong(sn, sa, ss, sd); // Send the four variables for Song() to the addSong method
      }
      inputStream.close();
  </code></pre>
  
  <p>I have a feeling I could work with indexOf() here but I'm not sure how.</p>
  
  <p>Cheers!</p>