You probably meant to say $string !~ m/[^0-9a-f]/i. Here you specify the values that are ok and everything else is forbidden.
Update Oops! I fixed the regex so that '!' became '^'. I've been reading too much VB-alike docs lately.
Fun Fun Fun in the Fluffy Chair
In reply to Re: Validating Hex Numbers
by diotalevi
in thread Validating Hex Numbers
by HiFoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |