my ($match) = defined $input ? $input =~ /\.(.+?)\./ : undef;