Friday, April 06, 2007

正規表現の例 perl

my $n = 5;
unless ($n =~ /^[1-5]$/) {
print "n is not from one to five";
}else{
print "n is between one and five";
}

No comments: