That's an unfortunate side-effect of the fact that mirc uses $1, $2 etc internally to fill the values of \1, \2, \t, \a etc in <sub>. To get an idea, try this:
//echo -ag $regsubex(a,/(a)/,< $1 : $2 :: \1 \n >)
The $+ stuff you saw in your second example are due to the fact that when mirc encounters something like "a\1b", it turns it to "a $+ $1 $+ b", so that $1 doesn't touch other things. In this case, b is the comma right after \1 (if you leave a space, you'll see $+ is omitted).
This doesn't happen in $regsub because of the completely different way <sub> is evaluted there.
Last edited by qwerty; 24/01/08 09:20 PM.