%digitsPattern Creates a pattern that matches digit characters
%   PAT = digitsPattern returns a pattern that matches one or more digits.
%
%   PAT = digitsPattern(N) returns a pattern that matches exactly N digits.
%
%   PAT = digitsPattern(minDigits,maxDigits) returns a pattern that matches 
%   at least minDigits digits and no more than maxDigits digits.
%
%   Examples
%       STR = "My phone number is 1-555-123-4567";
%
%       PAT = digitsPattern;
%       extract(STR,PAT)                   % returns  ["1"; "555"; "123"; "4567"]
%
%       PAT = digitsPattern(3);         
%       extract(STR,PAT)                   % returns  ["555"; "123"]
%
%       PAT = digitsPattern(2,4);         
%       extract(STR,PAT)                   % returns  ["555"; "123"; "4567"]
%
%   See also pattern, lettersPattern, alphanumericsPattern, contains, extract.

%   Copyright 2019-2020 The MathWorks, Inc.