#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)^(?:[\t ]*(?:\r?\n|\r))+"
Local $sString = "TITLE ---" & @CRLF & _
"=========" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Ergo Proxy Sinus Putrid A.D.2049" & @CRLF & _
"§ - Chapter 01" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Textum Receptus " & @CRLF & _
"Holy [link](https://www.unicode.org/index.html)" & @CRLF & _
"" & @CRLF & _
"Image 01-" & @CRLF & _
".." & @CRLF & _
"Image 09" & @CRLF & _
"" & @CRLF & _
"§§°ç^?" & @CRLF & _
" § - Chapter 2 %&&&" & @CRLF & _
"" & @CRLF & _
"End." & @CRLF & _
"Loigismo Amonitus Heracleion" & @CRLF & _
"Poltrer Hegheist Lotrar Ultreum" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Unicus Scribus """!€*ù7n" & @CRLF & _
"Olk/6" & @CRLF & _
"" & @CRLF & _
"//n" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
""
Local $sSubst = ""
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