8175362: StringIndexOutOfBoundsException from /.*((a[^a]+){2})c$/.exec('ababc')Reviewed-by: sundar, hanneswContributed-by: priya.muthuswamy@oracle.com