How about this attempt?
Extract 2 Words Before and After Spain.kmmacros (2.9 KB)
Or this one:
Extract 2 Words Before and After Spain 2.kmmacros (2.9 KB)
For more information, see the wiki Searching the Forum for Answers section.