Back to LanguageTool Homepage - Privacy - Imprint

Regexp_match=".*" regexp_replace not working as expected

Hello, with this rule, I would expect the tool to find “tiger”, “leopard” or “puma” and replace it with “lion”, but it replaces them with “lionlion”. Why is it doing that, and how can I fix it?

<token regexp="yes">tiger|leopard|puma</token>
<suggestion><match no="1" regexp_match=".*" regexp_replace="lion"/></suggestion>

To replace with a specific word, you can just use <suggestion>lion</suggestion>.

There’s also an issue for it at