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
Updated on 30-Jul-2019 22:30:22

Advertisements