Fixed a bug in message parser

Matching only whitespaces is more correct than matching all non-word charactes.