How to use R in Java-8 regex.


\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]

Updated on: 30-Jul-2019

341 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements