#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mis)(?P<headers>.*)[\r\n][\r\n](?P<content>.*)"
Local $sString = "------WebKitFormBoundary3JCHTJWwvnOcvnSv" & @CRLF & _
"Content-Disposition: form-data; name="_format"" & @CRLF & _
"" & @CRLF & _
"json" & @CRLF & _
"------WebKitFormBoundary3JCHTJWwvnOcvnSv" & @CRLF & _
"Content-Disposition: form-data; name="rid"" & @CRLF & _
"" & @CRLF & _
"1" & @CRLF & _
"------WebKitFormBoundary3JCHTJWwvnOcvnSv" & @CRLF & _
"Content-Disposition: form-data; name="avatar"; filename="carlingford.jpg"" & @CRLF & _
"Content-Type: image/jpeg" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"���p�� " & @CRLF & _
"��T!1"AQa2q�#B�� R�$3b�C���%r�4S�&�5c" & @CRLF & _
"Ds��'ET�d6U��� ��L!1AQaq"��2����#��BR�b$3r����C%4S��s�&5DTc���?�g������F΅%v9��Ge�9�С@#B�'�y�4!p|hPW%<�8�:n��9�hI�B;�Ж�:R{�8Ћ(�m�:m�*����0��vƄ#��?'B���BQ����BGo}" & @CRLF & _
";#�a#�΄U��W�x?�E��H��:��#Ռ�t�L�6C�u ��#�R����22����n�c���B�@3ƅ"��ZRN�dv΄�����Д��pB��'B]�rҥ�����Q���)P�� �R�����R9Y�I&��� =���X?�bI�u��ĮQ���!C�'dn�}��-n�s�j8 �c$����Q����$�q��� �@�J9$ryԁj�pN�9���B8+*��v�Sih�J}[�W��ґ���R�r�?��h�I�J!�P�?J��+��T���+��Q�)�m" & @CRLF & _
"od"
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