Java regex error - O grupo look-behind não tem um comprimento máximo óbvio
Eu recebo este erro:
java.util.regex.PatternSyntaxException: Look-behind group does not have an
obvious maximum length near index 22
([a-z])(?!.*\1)(?<!\1.+)([a-z])(?!.*\2)(?<!\2.+)(.)(\3)(.)(\5)
^
Estou tentando igualarCOFFEE
, mas nãoBOBBEE
.
Estou usando o java 1.6.