strtok
token = strtok('str',delimiter);
s = 'This is a book, which I gave you.';
[token1,rem1] = strtok(s,',');
token1 = This is a book
[token2,rem2] = strtok(s,'.');
token2 = This is a book, which I gave you
strtok
token = strtok('str',delimiter);
s = 'This is a book, which I gave you.';
[token1,rem1] = strtok(s,',');
token1 = This is a book
[token2,rem2] = strtok(s,'.');
token2 = This is a book, which I gave you