%% Select Text After Substring
% Create string arrays and select text that occurs after substrings.
% Starting in R2017a, you can create strings using double quotes.

str = "The quick brown fox"

%
% Extract the substring that occurs after the substring "quick ". The extractAfter function selects the new text but does not include "quick " in the output.

newStr = extractAfter(str,"quick ")

%
% Create a new string array from the elements of a string array. When you specify different substrings as positions, they must be contained in a string array or a cell array that is the same size as the input string array.

str = ["The quick brown fox jumps";"over the lazy dog"]

%

newStr = extractAfter(str,["quick ";"the "])

% You also can specify one substring as a position that is applied to all elements of the input string array.
% Copyright 2012 The MathWorks, Inc.