I\'m using scanner with delimiter and I\'ve came across a strange behaviour I\'d like to understand.
I\'m using this programm :
Scanner sc = new
I happened to encounter the empty token problem with the Scanner class too. I think the delimiter pattern has to be made greedy by surrounding it with parenthesis and appending + to the group. The pattern I used looks like this
"((\\s)+|(\\\\r\\\\n)+|\\p{Punct}+)+".