That works, except that the part of the replaced text containing the variable [search_string] is not replaced as I expect.
Example: I search for the word neobook, NeoBook is found in the HTML file and replaced by
<span style=[#34]background:yellow;font-weight:bold[#34]>neobook</span>. How can I achieve that will be replaced by <span style=[#34]background:yellow;font-weight:bold[#34]>NeoBook</span>?

Thank you for your hint, Hans-Peter, but that wasn't the problem. I think that $1 in the hpwReplaceRegExp is placeholder for the search term and not for the found one.
Maybe there is a logical misunderstanding at my side.
I search case insensitive, but the in the replaced phrase it should be like the original (i.e. case sensitive).
Staying with my example, if I search for neobook, it could appear as Neobook, NeoBook or NEOBOOK in the searched string (the HTML file). That should lead to three different replacements:

(dgFindFile is an action of another plugin to find all HTML files that contain that word) and store them into a list box. Then the user clicks one of the list items and I use BrowserLoadFromStr to display the appropriate file after having highlighted the search word in this file.

I don't understand the meaning of flag for subtitution in hpwReplaceRegExp

I am myself not sure where the possible settings would make sense.
The great TRegExpr-package has this switch and I simply make everything accessible from neobook by simply bypassing all parameter.
But there is a lot more possible with possible part-results where you may want to see the result-placeholders.