improve tokeniser regex to handle spaces correctly