Help for this page

Select Code to Download


  1. or download this
    sub catch_exons2 {
        my @res;
        push @res, [substr($1, 0, 1), length $1] while $_[0] =~ /(a+|x+)/g
    +;
        return @res;
    }
    
  2. or download this
    $string = 'aaaaxxxaxaxaaaaaaaxxxxxxxxxxaax';
    @regions = map { [substr($_, 0, 1), length $_] } $string =~ /(a+|x+)/g
    +;