my $string = "a(b)cd(e)fg(h)ij(k)l"; my @parts = split /(?=(?:.{5})+$)/, $string';