I have defined the delimiters as follows,
scanner.useDelimiter("a|b");
Then after executing next() method I want to know on which delimiter it did the split.
String s = scanner.next();
//char delim = scanner.nextDelimeter(); ??
Is there a way to achieve this in java while using Scanner class?