title: Java Scanner parsing input
body: <p>I have the the following input string:</p>
  
  <pre><code>1 imported box of chocolates at 10.00 1 imported bottle of perfume at 47.50
  </code></pre>
  
  <p>I would like to use the Java Scanner class to parse this input to create a list of product objects for example.</p>
  
  <p>Please note the input line consists of multiple products (two in this case) as follows:</p>
  
  <pre><code>Quantity: 1
  Name: imported box of chocolates
  Price: 10.00
  
  Quantity: 1
  Name: imported bottle of perfume
  Price: 47.50
  </code></pre>
  
  <p>Ideally I would like to parse the first product portion of the line and then the next product portion.</p>
  
  <p>I know how to do this using regex etc but the question is:</p>
  
  <pre><code>What is the best way to use the Java Scanner to parse the input line?
  </code></pre>
  
  <p>Thank you.</p>