$url and $id are replaced correctly. $urlq is not; it's empty. If I put
$urlq right after the assignment as an output expression, everything works
fine. But it refuses to allow me to assign it as in the above.
Any ideas?
$urlq is set when it's "displayed", not just accessed. So if you've
never displayed it, it won't be set. A better way would be to use <capture>
<capture>
<a href="$url/$urlq&cmd=links&id=$id">\1</a>
</capture>
Now, from looking at what you're doing, you may be going down the garden path.
It looks like you're building a replace string for <sandr>, but for output
that you are already in control of.
What are you really trying to do here? There's probably a more direct method.