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

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

% Extract the pattern.

boundaries = extract(txt,pat)

% Copyright 2020 The MathWorks, Inc.