in reply to Re: hex-only regex
in thread hex-only regex
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: hex-only regex
by jettero (Monsignor) on Jan 17, 2007 at 19:18 UTC | |
by Roy Johnson (Monsignor) on Jan 17, 2007 at 23:46 UTC |