#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = " \n {24}"
Local $sString = "RAW DATA " & @CRLF & _
"26/11/15 26/11/15 1314 NEFT : CMS364134568 - CRE " & @CRLF & _
" DIT CARD OPERATIONS " & @CRLF & _
"26/11/15 26/11/15 1314 Cash Deposit " & @CRLF & _
"27/11/15 27/11/15 1314 NEFT : CMS364860637 - CRE " & @CRLF & _
" DIT CARD OPERATIONS " & @CRLF & _
"27/11/15 27/11/15 1314 Cash Deposit " & @CRLF & _
"30/11/15 30/11/15 1314 NEFT : CMS365476895 - CRE " & @CRLF & _
" DIT CARD OPERATIONS " & @CRLF & _
"30/11/15 30/11/15 1314 NEFT : CMS365573866 - CRE " & @CRLF & _
" DIT CARD OPERATIONS " & @CRLF & _
"30/11/15 30/11/15 1314 NEFT : CMS365623059 - CRE " & @CRLF & _
" DIT CARD OPERATIONS"
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