%% Match Start and End Boundaries of Letters
% Use the "start" and "end" options for letterBoundary to match the boundary between letters and nonletter characters.
% Create a string that contains several different character types. Create a pattern that matches any characters between a "start" boundary for letters and an "end" boundary.

txt = "123 abc .?! def 456";
pat = letterBoundary("start") + wildcardPattern(1,inf) + letterBoundary("end");

% Extract the pattern.

boundaries = extract(txt,pat)

% Copyright 2020 The MathWorks, Inc.