#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(?ix)" & @CRLF & _
"(\d+:\d\d)" & @CRLF & _
"\s+" & @CRLF & _
".*?" & @CRLF & _
"\b" & @CRLF & _
"(" & @CRLF & _
" mon(?:d(?:ay?)?)" & @CRLF & _
"|tue(?:s(?:d(?:ay?)?)?)?" & @CRLF & _
"|wed(?:n(?:e(?:s(?:d(?:ay?)?)?)?)?)?" & @CRLF & _
"|thu(?:r(?:s(?:d(?:ay?)?)?)?)?" & @CRLF & _
"|fri(?:d(?:ay?)?)" & @CRLF & _
"|sat(?:u(?:r(?:d(?:a)?)?)?)?(?:y)?" & @CRLF & _
"|sun(?:d(?:ay?)?)" & @CRLF & _
")" & @CRLF & _
".*"
Local $sString = "0:18 on Tuesday's mini" & @CRLF & _
"1:43 Wednesday. dang!" & @CRLF & _
"2:01 this Sat 😎"
Local $sSubst = "$1 $2"
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