%% Extract Text
% Create a string.

str = "alphabetical"

%
% Extract the substring "bet".

newStr = extract(str,"bet")

%
% Extract the substring "al". Since it occurs more than once in str, the extract function returns the matching substrings in a string array.

newStr = extract(str,"al")

% Copyright 2020 The MathWorks, Inc.