in reply to Re: matching between 1 to 8 digits but not more
in thread matching between 1 to 8 digits but not more

If you don't care about consecutiveness:

$digits = () = 'a1b2c3d4 e5f6g7h8i9' =~ /\d/g;