in reply to specific numbers of digits

Put an upper limit on that match, say you want between 5 and 7 digits:
my $ID = 0123456; if ($ID =~ /\d{5,7}/ { do this... }
So for your case, perhaps /\d{5,5}/

Replies are listed 'Best First'.
Re: Re: specific numbers of digits
by pg (Canon) on Mar 19, 2003 at 05:11 UTC
    This does not meet his requirement, as your regexp still matches 6-digit strings i.e. your regexp still matches strings like "123456".