%digitBoundary Creates a pattern that matches the beginning or end of a substring of digits
%   PAT = digitBoundary returns a pattern that matches the beginning or end of
%   a substring of digits.
%
%   PAT = digitBoundary(TYPE) returns a pattern that matches the TYPE of
%   digit boundary. TYPE can be 'start', 'end', or 'either'.
%
%   Examples
%       STR = "The answer is 42!";
%
%       PAT = digitBoundary('start');
%       replace(STR,PAT,'-')                % returns  "The answer is -42!"
%
%       PAT = digitBoundary('end');
%       replace(STR,PAT,'.0')               % returns  "The answer is 42.0!"
%
%   See also pattern, textBoundary, letterBoundary, contains, extract, newline.

%   Copyright 2019-2020 The MathWorks, Inc.