#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(.*)"
Local $sString = "HIT & REPLACE" & @CRLF & _
"11/21/1994" & @CRLF & _
"12/11/2014" & @CRLF & _
"03/31/2016 # Hit only if unchecked for length months/days" & @CRLF & _
"" & @CRLF & _
"NO-HIT" & @CRLF & _
"11//12/2090" & @CRLF & _
"37/14/2015" & @CRLF & _
"20/27/2011" & @CRLF & _
"10/32/1964" & @CRLF & _
"14/03/2020" & @CRLF & _
"" & @CRLF & _
"HINTS" & @CRLF & _
"- Use g-flag only." & @CRLF & _
""
Local $sSubst = "$1,$1,$1"
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