#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(X-PPP-Vhost: test.com)"
Local $sString = "From: alex@test.comTo: alex2 alex2@test.comSubject: testing email filterUser-Agent: Roundcube Webmail/1.4.11 Message-ID: 3907e0dede914479d42ecddb829da9a6@test.comX-Sender: alex@test.comContent-Type: text/plain; charset=US-ASCII; format=flowedContent-Transfer-Encoding: 7bitX-PPP-Message-ID: 164243412854.574642.9867894171662743646@intelligent-mahavira.ip.plesk.pageX-PPP-Vhost: test.com"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; Present the entire match result
_ArrayDisplay($aArray, "Result")
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