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

chr = 'mushrooms, peppers, and onions'

%

newChr = eraseBetween(chr,10,19)

%
% Delete text between substrings.

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

% Copyright 2012 The MathWorks, Inc.