I'm trying to use regrex to separate int values from a string. Here is what I have.
Scanner input = new Scanner(System.in);
String date = input.next();
Pattern p = Pattern.compile("-?\\d+");
Matcher ma = p.matcher(date);
ma.find();
while (ma.find())
{
System.out.println(ma.group());
}
It works ok...
I want to take the digits from a date format 02/03/04 or 3/5/2008
My output is
03
04
and
5
2008
Could someone tell me why the first set is being skipped?
Thanks!

