%% Extract Text Data from Text File
% Extract the text from sonnets.txt using extractFileText. The file sonnets.txt contains Shakespeare's sonnets in plain text.

str = extractFileText("sonnets.txt");

% View the first sonnet.

i = strfind(str,"I");
ii = strfind(str,"II");
start = i(1);
fin = ii(1);
extractBetween(str,start,fin-1)

% Copyright 2012 The MathWorks, Inc.