#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mi)filename=\"(\w*.*)""
Local $sString = "--Apple-Mail=_380D7683-C2AA-4F13-8B31-93C43592D154" & @CRLF & _
"Content-Transfer-Encoding: 7bit" & @CRLF & _
"Content-Type: text/plain;" & @CRLF & _
" charset=us-ascii" & @CRLF & _
"" & @CRLF & _
"Cordialement." & @CRLF & _
"" & @CRLF & _
"Non prenom" & @CRLF & _
"" & @CRLF & _
"--Apple-Mail=_380D7683-C2AA-4F13-8B31-93C43592D154" & @CRLF & _
"Content-Disposition: attachment;" & @CRLF & _
" filename="mes candidatures.txt"" & @CRLF & _
"Content-Type: text/plain;" & @CRLF & _
" name="mes candidatures.txt"" & @CRLF & _
"Content-Transfer-Encoding: quoted-printable" & @CRLF & _
"" & @CRLF & _
"ici la piece jointe en texte B64"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; 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