I want the user to be able to type '!test [some text here]'

this works fine as its only 3 words:

on *:text:!test & & &:#: {
msg # $2
msg # $3
msg # $4
}

but what if the line entered has a varying amount of words that i do not know. it could be anything from 1 to anything!!

please help!