in reply to tokenize plain text messages

You might want to look at Parse::RecDescent.
There is also an FAQ at Parse::RecDescent::FAQ

artist