I need a simple script to run in Windows that searches large xml files for a keyword, then returns the word before it, the keyword, and the word after.
For example:
“How can I extract keywords in context”
I want:
“extract keywords in”
I’m a novice with enough knowledge to return each line with the Keyword, and the lines before and after, but I’m stumped on getting the individual words I need out.
Anyone have any clever ideas?
Here’s one way: