use strict; use warnings; my $DB_string = "Database_Test_Access_DB"; my ($get) = $DB_string =~ /_(.+?)_/; print $get, "\n";