or download this
my $fail = qr/^ # Start looking at the begining of the string
(?! # and immediately fail if you find
...
) # If you got this far with failing (ie. matching t
+he enclosed.
\d+$ # then match if the whole string consists of digit
+s.
/x