%% Extract Words from Text
% Use lettersPattern to extract words from a string containing letters, numbers, white spaces, and punctuation.
% Create txt as a string. Create pat as a pattern object that matches letters using lettersPattern. Extract the pattern from txt.

txt = "The 2 parties agreed. The meeting would occur at 1 PM.";
pat = lettersPattern;
words = extract(txt,pat)

% Copyright 2020 The MathWorks, Inc.