... this was just to explain the error in your code ... /0{7}\d/ is much simpler and better.
I understand that the intended purpose of the code example is very limited, but I think it's very important to point out that the
$D1 !~ /0+/
test ("if there is not at least one '0' in the first 7 digits") is also a fundamental error.
Give a man a fish: <%-{-{-{-<
In reply to Re^2: Match all Non-0 and Letters
by AnomalousMonk
in thread Match all Non-0 and Letters
by arblargan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |