Grok filter - issues with spaces and special charecters

Greedydata should also work, but NOTSPACE just pulls every character until there is a space. So it would be %{SPACE}:|:%{SPACE}%{WORD:hostname}%{SPACE}:|:%{NOTSPACE:UniqueID}.