title: Parse date in String format to Gregorian Calendar, with hour and minute
body: <p>I'm trying to parse an input string date to GregorianCalendar:</p>
  
  <pre><code>Scanner scan = new Scanner(System.in);
  String next = scan.next("[0-9]{2}.[0-9]{2}.[0-9]{4} [0-9]{2}:[0-9]{2}");
  scan.nextLine();
  
  DateFormat df = new SimpleDateFormat("dd.MM.yyyy hh:mm");
  Date date = null;
  try {
      date = df.parse(next);
  } catch (ParseException e1) {
      e1.printStackTrace();
  }
  
  GregorianCalendar cal = new GregorianCalendar();
  cal.setTime(date); 
  
  System.out.println(cal.getTime());
  </code></pre>
  
  <p>But it keeps giving this error:</p>
  
  <pre><code>java.util.InputMismatchException
     at java.util.Scanner.throwFor(Unknown Source)
     at java.util.Scanner.next(Unknown Source)
     at java.util.Scanner.next(Unknown Source)
  </code></pre>
  
  <p>Can anybody help me? This works if i don't specify the hours and minutes but not like this...</p>