%% Extract Letters from an Alphabetical Range
% Use characterListPattern to extract letters falling within a specified alphabetical range.
% Define a pattern expression, pat, that matches only the lowercase letters from a to g using characterListPattern. Extract the pattern from the string.

txt = "ABCDEFGHIJKLMONPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
pat = characterListPattern("a","g");
letters1 = extract(txt,pat)

% Copyright 2020 The MathWorks, Inc.