Python, just read in line, split, chuck the first part, concat the hex into a string, and search. Something like this would work:
hex = ""
for each line in lines:
tmp = line.split() // split on whitespace
hex += tmp[1:] // grab everything after address
if hex.contains(pattern):
# do something
Or use a regex, but you get the basic idea.