You can use grep with the PCRE facility. It's available in most of the newer versions of grep.
$ grep -oP "^(\w"^[[:alnum:]]{12})" test.txt
6982a9948422
This will give you all the matches that are 12 long and include characters that are valid in words, [a-zA-Z0-9].