Shorthand for [^ \s] is \S. Also you could replace every space with \s+ to make this parser a little bit more flexible (will ignore multiple spaces and unwanted line breaks then).