Yes ! It works great, thank you.. just a little comment.. I replaced the hasNext(Pattern p) method with the no-arg hasNext() method. That's because, i suppose, if in the first token the pattern is not matched, the expression returns false and it will never get into the loop.
PS:. Sorry for my english, i learned the language reading kathy sierra's certification book
Originally posted by Ankit Garg:
Hi Emanuel! Welcome to javaranch.
Why don't you read the file completely first, then scan it. like this
I have not tested this code but I think it will work...