For the regex part, you don't need to specify another if statement to reference another command, just else will do it...since you only have two of them...so it's either true or false.
Quote:
on $*:text:/^!(ping|commands)$/Si:#mIRC: {
if $regml(1) == ping {
;do something
}
else {
;do something else
}
And you don't need to enclose regex with $() because there is no identifier used to be evaluated.