my ($INV_NB, $USAGE)=split /\|/,"9998|999999999999999";
if ($USAGE=~/^\d{15}\b/)
{
print "\nUSAGE is Valid\n";
print "length of $USAGE is ",length($USAGE);
}
这按预期工作,但我怎样才能否定这个正则表达式?说如果使用不是/^\d{15}\b/
if ($USAGE!=~/^\d{15}\b/)
{
print "\nUSAGE is Invalid\n";
print "length of $USAGE is ",length($USAGE);
}
我试过这个,但它不工作..