How to use \R in Java-8 regex.

Java 8Object Oriented ProgrammingProgramming

\R matches any line break as defined by the Unicode standard

Pattern p = Pattern.compile("\\R");

Unicode line-break sequence is equivalent to \u000D\u000A|[\u000A\u000B\u000C\u000D\u0085\u2028\u2029]

raja
Published on 22-Jun-2018 15:41:16
Advertisements