Java regex error – Look-behind group does not have an obvious maximum length

To avoid this error, you should replace + with a region like {0,10}:

([a-z])(?!.*\1)(?<!\1.{0,10})([a-z])(?!.*\2)(?<!\2.{0,10})(.)(\3)(.)(\5)

Leave a Comment