Hi your problem is probably not a casing issue. It seems to be the same as that question:
Why Office OpenXML splits text between tags and how to prevent it?
Indeed, the text inside the docx might be splitted:
##Interest Rate##
-> splitted
<w:t>##Interest</w:t>
<w:t> Rate##</w:t>
The replace won't find that string (have a look at the link)