%% Match Start and End Boundaries of Lines
% Use the "start" and "end" options for lineBoundary to match the specified endpoint of a line.
% Create a string with a newline character. Create a pattern that matches any characters between two "start" boundaries of lines.

txt = "This is line one." + newline + "Here is line two." + newline + "Last but not least, line three!";
pat = lineBoundary("start") + asFewOfPattern(wildcardPattern(1),1) + lineBoundary("start");

% Extract the pattern.

boundaries = extract(txt,pat)

% Copyright 2020 The MathWorks, Inc.