Master of death, you don't have to include the exclamation mark in the $regml(1) to return. Thus you don't even have to use $remove() in the first place. Check this out:
alias test if $regex($1,/!(master)/i) { echo -a $regml(1) }
/test !master will return: master
But if you include it in the enclosed matching range like this:> alias test if $regex($1,/(!master)/i) { echo -a $regml(1) }Then it'll return: !master
When you use $regml() you must enclose the regex pattern with a set of parenthesis.