Since you will not indicate which regex engine you are using, I will take a basic level, in which case " [^A-Za-z]key[^A-Za-z]" will be enough.
If you also want to catch the line at the beginning and end of the line, you will also have to use " ^key[^A-Aa-z]" and " [^A-Aa-z]key$".