Not sure, it works fine here.
The error you reported is probably due to the need to use %% instead of % in the text you were testing with as the % symbol is used to specify a macro name.
Attached is the same example (slightly modified with your sample text) demonstrating the correct replacement behaviour with your actual text.
|