This means that you could have "123423453456456756786789789a89ab\n" in your string, and it'd still match. While this may not make any difference for your application, in some cases this could be a missed crucial check for a security validation, allowing a messy character where it doesn't belong (such as in a filename).
Beware the dollar. Use \z instead: /^[0-9a-f]{32}\z/i.
In reply to Re^2: hex-only regex
by merlyn
in thread hex-only regex
by dwhite20899
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |