#!/usr/bin/perl my $string="testing.123"; my ($result) = $string =~ m/(.*?\.)[0-9]+/; print "$result\n" if $result;