JDK-8023647 : " abc1c " .matches( " (\\w)+1\\1 " )) returns false
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.regex
  • Affected Version: 7u11
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_7
  • Submitted: 2013-04-04
  • Updated: 2019-06-27
  • Resolved: 2013-08-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u241Fixed 8 b106Fixed
Description
FULL PRODUCT VERSION :
java version  " 1.7.0_11 " 
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Ver 6.1.7601]

A DESCRIPTION OF THE PROBLEM :
System.out.println( " abc1c " .matches( " (\\w)+1\\1 " )); // prints false
But
System.out.println( " abc11 " .matches( " (\\w)+1\\1 " )); // prints true

REGRESSION.  Last worked in version 7


REPRODUCIBILITY :
This bug can be reproduced always.