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

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

% Extract the pattern.

boundaries = extract(txt,pat)

% Copyright 2020 The MathWorks, Inc.