my $text = 'whatever...'; my ($start, $end) = qw( /\*\*/ /\*\*/ ); my $matches = my @db_list = $text =~ /$start(.*?)$end/gi;