# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/(\S)[ \t]*(?:\r\n|\n)[ \t]*(\S)/\1 \2/g;t' <<< "Random Data, Company
2015
This is a sentence that has line
break in the middle of it due to extracting from a PDF.
How do I support
3 line sentence
breaks please?
HEADER HERE
The first sentence will
match. However, this line will not match
for some reason
that I cannot figure out.
Portfolio:
http://DoNotMatchMeBecauseIHaveAPeriodInMe.com
Full Name
San Francisco, CA
94000
1500 testing a number as the first word in
a broken sentence.
Match sentences with capital letters on the next line like
Wi-Fi.
This line has
trailing spaces after exclamation mark!
"
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html