%% Match Variably Sized Sets of Letters and Digits
% Use alphanumericsPattern to match sets of letters and digits with a size that falls into specified range.
% Create txt as a string. Create pat as a pattern object that matches groups of two to four letters and numbers using alphanumericPattern. Extract the pattern from txt.

txt = "12345ABCDE";
pat = alphanumericsPattern(2,4);

alphanumerics = extract(txt,pat)

% Copyright 2020 The MathWorks, Inc.