Tokenize a string into an array of string parts and format identifier objects.