validate id format
use POSIX character class for hexadecimal characters
use beginning/end of string matchers

(not beginning/end of line matchers)