%% Select Text Between Positions in Character Vector
% Create a character vector and select text between start and end positions.

chr = 'mushrooms, peppers, and onions'

%

newChr = extractBetween(chr,12,18)

%
% Select text between substrings.

newChr = extractBetween(chr,'mushrooms, ',', and')

% Copyright 2012 The MathWorks, Inc.