#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)\.(?=(.*)\b(?:19[2-9]|20[0-2])\d\b)"
Local $sString = "This.Is.The.Movie.Title.1930.details.of" & @CRLF & _
"This.Is.The.Movie.Title.2013.details" & @CRLF & _
"" & @CRLF & _
"This.Is.The.Movie.Title.1919.details.of (year too early)" & @CRLF & _
"This.Is.The.Movie.Title.2030.details.of (year too late)" & @CRLF & _
"This.Is.The.Movie.Title.201.details.of (too few year digits)" & @CRLF & _
"This.Is.The.Movie.Title.20000.details.of (too many year digits)" & @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