#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(?<=says\sto)[\s\S]*?(?=\(\d{4}-\d{2}-\d{2}\s(\d\d:){2}\d{2}\s\w{2}\s\w{3}\))"
Local $sString = "(2021-07-04 11:58:43 PM BST) " & @CRLF & _
"--- " & @CRLF & _
"len wee zim (Tradition (US) ) says to yohan sen " & @CRLF & _
"[[:Conversations will be recorded and may be monitored by the participants and" & @CRLF & _
"their employers:]] Hi yohan " & @CRLF & _
" " & @CRLF & _
" " & @CRLF & _
"" & @CRLF & _
"(2021-07-05 12:04:42 AM BST) " & @CRLF & _
"--- " & @CRLF & _
"len wee zim (Tradition (US) ) says to yohan sen " & @CRLF & _
"okay -5 / 0 ." & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"(2021-07-04 11:47:14 PM BST) " & @CRLF & _
"--- " & @CRLF & _
"Ke Cho Ki says to" & @CRLF & _
"Hano Cho " & @CRLF & _
"hello " & @CRLF & _
" " & @CRLF & _
"" & @CRLF & _
"(2021-07-05 12:09:41 AM BST) " & @CRLF & _
"--- " & @CRLF & _
"len wee zim (Tradition (Asia)) says " & @CRLF & _
"to yohan sen " & @CRLF & _
"yes -5 / 0 TN -- / +2.5 " & @CRLF & _
" " & @CRLF & _
" " & @CRLF & _
"--- " & @CRLF & _
" " & @CRLF & _
"* * *" & @CRLF & _
"" & @CRLF & _
"Processed by wokl Archive for son malab | 2021-07-05 12:26:44 AM" & @CRLF & _
"BST " & @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