(progn

   (string-match "\\(key[ \t]*\\)= \\(.*\\)" (buffer-string))

   (match-string 0))

 

Key = 100

->#("

Key = 10" 0 1 (fontified t) 1 9 (fontified t))

 

Is not “key = 100”?