1) No it can't be done currently. Of course you can take the long route and use $regml(), but depending on the exact pattern it can get very complicated sometimes. This is something I'd very much like to see.

2) Change: var %pat = ;(0|[ $+ %test $+ ]); to var %pat = ;(0 $+ $iif(%test != $null, |[ $+ %test $+ ]) $+ );
I haven't tested that but it should work.


Spelling mistakes, grammatical errors, and stupid comments are intentional.