$filecontent="12345-123456 is number. 98945-221349" if($filecontent=~m/[0-9]{5}-[0-9]{6}/) print "Match found";