Kate snippet regex problem

With this command, in a kate snippet (as text), I get an incomplete output:

${rangeCommand(“<a href="#n%%1" id="ref%%1">%%1”, “link”)}

I mean i get

<a href=“#nlink” id=“ref%%1”>%%1</a>

instead of

<a href=“#nlink” id=“reflink”>link</a>

I’m wrong in something or Kate snippets cannot work with that code?
Thank you!