#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?!\n(([^"]*"){2})*[^"]*$)\n"
Local $sString = "column1rowA "column2rowA" column3rowA column4rowA" & @CRLF & _
"column1rowB column2rowB "column3rowB" & @CRLF & _
"3Bcont" & @CRLF & _
"3Bcont" & @CRLF & _
"3Bcont" & @CRLF & _
"" & @CRLF & _
"" column4rowB" & @CRLF & _
"column1rowC column2rowC column4rowC" & @CRLF & _
"column1rowD column2rowD "column3rowD" & @CRLF & _
"3Dcont" column4rowD"
Local $sSubst = "<br>"
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