There are a lot of use case for negative value, this one being just another.

Interessed scripters have been knowing about regex returning the PCRE negative error value for a long time (it's documented on www.wikichip.org/mirc/regex)

This shouldn't be changed, $regex returning -10 is correct behavior, it should also keep returning -8 and -21 as that is the only way we have to know that there is a limit reached, where returning 0 would be taken as 'no match'. This is just a bug with $regsubex (and $regsub) not being made to report the error back, although not that nice, they should probably return the error code just like $regex


#mircscripting @ irc.swiftirc.net == the best mIRC help channel