This is what you want i guess:
$re = '/((\w* ){0,5})(keyWord)(( \w*){0,5})/i';
$str = 'klaus steven keyword peter holger und so weiter und so fort';
preg_match_all($re, $str, $matches);
It has "word followed by space" for 0 to 5 times, then your keyword and then another "space followed by word" for 0 to 5 times.
See it working with more information here