*Pretext*
The reference implementation has strange behavior when there are nested
character classes involved.
This is described briefly in the bug report:
https://bugs.openjdk.java.net/browse/JDK-6609854
And also brought up again with more details on stackoverflow.com
I request that JDK-7171390 be closed, since there is a typo in the bug
report
Copied from the bug report
1 - String r1=blah - * ^% $^ [gf].replaceAll([a-zA-Z0-9], -);
2 - String r2=blah - * ^% $^ [gf].replaceAll([0-9a-zA-z], -);
The regex from String r2 specifies A-z, instead of A-Z. The