#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(\d{1,4}).(\d{1,4}).(\s?\d{4})"
Local $sString = "Juan Ponce de León sights Florida for the first time, on 3.27, 1513" & @CRLF & _
"Giovanni da Verrazzano explored the Atlantic coast of North America under French employ, on 4.17.1524" & @CRLF & _
"The Roanoke Colony was found deserted, on 8/15/1590" & @CRLF & _
"John Smith founded the Jamestown settlement, on 5/14, 1607" & @CRLF & _
"The Dutch laid claim to the territories of New Netherland, on 11.11.1614" & @CRLF & _
"The Massachusetts Bay Colony founded, on 3-4-1629"
Local $sSubst = "$3-$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