RFR: 8264160: Regex \b is not consistent with \w without UNICODE_CHARACTER_CLASS [v4]

Brian Burkhalter bpb at openjdk.java.net
Wed Mar 9 16:34:06 UTC 2022


On Wed, 9 Mar 2022 01:33:43 GMT, Ian Graves <igraves at openjdk.org> wrote:

>> Proposed change in behavior to correct inconsistencies between `\w` and `\b` metacharacters
>
> Ian Graves has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Updating with additional descriptors. Removing DataProvider import

src/java.base/share/classes/java/util/regex/Pattern.java line 161:

> 159:  *     <td headers="matches predef any">Any character (may or may not match <a href="#lt">line terminators</a>)</td></tr>
> 160:  * <tr><th style="vertical-align:top; font-weight:normal" id="digit">{@code \d}</th>
> 161:  *     <td headers="matches predef digit">A digit: {@code [0-9]} if if <a href="#UNICODE_CHARACTER_CLASS">

Looks like there is a superfluous `if` here.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7539


More information about the core-libs-dev mailing list