I've been trying to do a regex to match and replace the occurrences of a keyword on a portion of HTML:

1. i want to match `keyword` and `<strong>keyword</strong>`
2. but `<a href="someurl.html" target="_blank">keyword</a>` and `<a href="someur2.html">already linked keyword </a>` should NOT be matched

I'm only interested in matching (and replacing) the `keyword` on the 1st line.

The reason I want this is to replace `keyword` with `<a href="dictionary.php?k=keyword">keyword</s>`, but ONLY if `keyword` it's not already inside an `<a>` tag.

Any help will be much appreciated!