Your problem is the presence of a comma in the regular expression. Since mIRC does not use quotes around strings it is unable to distinguish a comma meant for the regular expression from one meant to separate two parameters to $regex(). The fix is simple: assign the regular expression to a variable and use that in the $regex() call.

Code:
var %re = /\d{3,5} (\S+)/
echo $regex($1-, %re)


Spelling mistakes, grammatical errors, and stupid comments are intentional.