#!/usr/bin/perl -wl use strict; my $scalar = '1335'; print "Found" if $scalar =~ /^[1-5]+$/; print "Found" if $scalar !~ /[^1-5]/;
--
John.
In reply to Re: Detect presence of numbers 1-9
by jmcnamara
in thread Detect presence of numbers 1-9
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |