Yeah, this works but kinda defeats one of the purposes of the $ event prefix, which is to avoid the evaluation of identifiers/variables. The %variable way is probably the fastest workaround, but... it has to be a global variable, not a pretty solution. $($mypattern) in the header works too, but now the overhead is very close to that of /if ($regex($1-,<pattern>)) in the event body.

/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com