www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/SelectTextAfterPositionInCharacterVectorExample.m

    %% Select Text After Position in Character Vector
% Create a character vector. Then create new character vectors that are
% substrings of |chr|.
chr = 'peppers and onions'

%%
% Select text after the 12th position.
newChr = extractAfter(chr,12)

%%
% Select text after a substring.
newChr = extractAfter(chr,'and ')