; Slightly different from $regsub: you don't put a variable as the last argument.
; Example: echo 4 -a IAL entries: $regsube(test *!*@* test, /^.*(\S+\!\S+@\S+).*$/, $!ial(\1, 0))
alias regsube {
var %original = $1, %regex = $2, %replacement = $replace($3, $, $chr(1)), %result
.echo -q $regsub($1, $2, %replacement, %result)
set %result $replace(%result, $chr(1), $)
set %result $eval(%result, 2)
return %result
}