Fix bug on regexp insertion for xml messages