It was a bug in Java 8 and it got fixed: JDK-8176029 : “Linebreak matcher is not equivalent to the pattern as stated in javadoc”.
Also see: Java-8 regex negative lookbehind with `\R`
It was a bug in Java 8 and it got fixed: JDK-8176029 : “Linebreak matcher is not equivalent to the pattern as stated in javadoc”.
Also see: Java-8 regex negative lookbehind with `\R`