The result of following is different in JDK1.5 and JDK6.
Scanner scanner = new Scanner("\n");
String result = scanner.findInLine("(?s).*");
It seems that JDK6 does not work with embedded flag expression "(?s)".
I'm trying on Windows XP.
result : \n
JDK6 (j1.6.0-b105, 1.6.0_01-ea-b02)
The following example using Pettern and "(?s)" returns the
expected result on both JDK1.5 and JDK6, so it seems that
the behavior of Scanner class is changing.
Pattern pattern = Pattern.compile("(?s).*");
Matcher matcher = pattern.matcher("\n");