Is this PHP? The function should be seperating the string into tokens based on the delimiter. In your example 'greeting pe' would become the first token of the tokenised string. The example from the PHP man page may help.
<?php
$string = "This is\tan example\nstring";
/* Use tab and newline as tokenizing characters as well */
$tok = strtok($string, " \n\t");
while ($tok !== false) {
echo "Word=$tok<br />";
$tok = strtok(" \n\t");
}
?>
As you can see, $tok is used repeatedly to move through the string. SO if you did a loop like the one above further calls to strtok should move through your string.