#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(?:\G(?!\A)|^\#{4}\s.*:\s*^>.*)\R\K.+"
Local $sString = "#### <u>Author name</u> writes in his 'Title of some Book/Essay/Article': " & @CRLF & _
"" & @CRLF & _
"> First sentence with soft line breaks at the end. " & @CRLF & _
"Second sentence. " & @CRLF & _
"Third sentence. " & @CRLF & _
"Any number of sentences if there are any will follow — all need to be in quote blocks. " & @CRLF & _
"" & @CRLF & _
"<Some other text not belonging to above author comes after empty line>. " & @CRLF & _
"" & @CRLF & _
""
Local $sSubst = "> $0"
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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 AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm