use strict; use warnings; my @aap = qw( 0aap 0noot 1mies 2mies 0aap 0noot 1mies 6mies ); for (@aap) { print "$_\n" if - reverse '0' . (/^1(.*)/ .. /^0(.*)/); } __END__ 1mies 2mies 1mies 6mies #### if ( -(/^1(.*)/../^0(.*)/) ) #### if ( (/^1(.*)/../^0(.*)/) ) #### if ( ( /^1(.*)/../^0(.*)/ ) =~ /(\d+)$/ ) { # $1 contains the sequence number of match