Help for this page

Select Code to Download


  1. or download this
    my $string = "a(b)cd(e)f"; 
    my @parts = split /(?=.{5}$)/, $string';
    
  2. or download this
    my $string = "a(b)cd(e)fg(h)ij(k)l"; 
    my @parts = split /(?=(?:.{5})+$)/, $string';
    
  3. or download this
    my $string = "a(b)cd(e)fg(h)ij(k)l"; 
    my @parts = $string =~ /(.{5})/g;