#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(\*\S*)"
Local $sString = ""DEFINE QLOCAL *ALTDATE(2015-02-19) *ALTTIME(10.38.13) *CRDATE(2015-02-19) " & @CRLF & _
"*CRTIME(10.38.13) DISTL(NO) MAXDEPTH(999999999) MAXMSGL(32762) REPLACE DEFINE " & @CRLF & _
"QMODEL('SYSTEM.JMS.TEMPQ.MODEL') *ALTDATE(2015-02-19) *ALTTIME(10.38.14) *CRDATE(2015-02-19) *CRTIME(10.38.14) " & @CRLF & _
"DEFTYPE(TEMPDYN) DISTL(NO) MAXDEPTH(5000) MAXMSGL(104857600) *ALTDATE(2015-02-19)"."
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