function process_text

	line = input('Line: ', 's');
	display(tokenize_line(line, ' !,:;.'));
	words = input('Words:');
	display(join_words(words));
   
function word_array = tokenize_line(given_string, delimiters)

	word_array = [];
	while ~(isempty(given_string))
	  [token, given_string] = strtok(given_string, delimiters);
	  word_array = char(word_array, token);
	end   
   
function line = join_words(words)
   
   line = [];
   while ~(isempty(words))
	  line = strcat(line, words(1,:), ':');
	  words = words(2:end,:);
	end
   
