%% Match Boundaries of Lines
% Use lineBoundary to match the start or end of a line of text.
% Create a string with a newline character. Create a pattern that matches letters following the start of a new line.

txt = "This is line one." + newline + "Here is line two.";
pat = lineBoundary + lettersPattern;

% Extract the pattern.

firstWord = extract(txt,pat)

% Copyright 2020 The MathWorks, Inc.