#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(BEGIN:VEVENT\n|(?!^)\G)(?:([A-Z;-]+)[:=][^\n]+)"
Local $sString = "BEGIN:VEVENT" & @CRLF & _
"SUMMARY:Marché légumes Dilbeek et bibliothèque#DTSTART;TZID=Europe/Paris:20130928T084500" & @CRLF & _
"DTEND;TZID=Europe/Paris:20130928T094500" & @CRLF & _
"DTSTAMP:20160126T214559Z" & @CRLF & _
"UID:aHR0cHM6Ly8xOTIuMTY4LjEuMjIwOjQ0MzIvb3duY2xvdWQvcmVtb3RlLnBocC9jYWxkYXYvY2FsZW5kYXJzL2FuZ2Vsby9kZWZhdWx0Y2FsZW5kYXIvOTkwM2QyNTctZjY2Ny00ZWI3LWFjZDEtNWJlZmI0NGQ0MmJlLmljcw==@google.com" & @CRLF & _
"RECURRENCE-ID;TZID=Europe/Paris:20130928T090000" & @CRLF & _
"SEQUENCE:1" & @CRLF & _
"CREATED:20160126T214559Z" & @CRLF & _
"LAST-MODIFIED:20160126T214559Z" & @CRLF & _
"STATUS:CONFIRMED" & @CRLF & _
"TRANSP:OPAQUE" & @CRLF & _
"END:VEVENT"
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