#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?<content>(?<type>.+?)\/(?<sub>.+?)(?:\+(?<suffix>.+?))?)(?:;.*?(?:q=(?<weight>[.\d]+))?.*?)?(?:,|$)"
Local $sString = "*/*" & @CRLF & _
"text/html,application/json;q=0.9" & @CRLF & _
"application/json; charset=utf-8" & @CRLF & _
"application/json; xx=utf-8" & @CRLF & _
"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" & @CRLF & _
"application/javascript" & @CRLF & _
"application/x-www-form-urlencoded" & @CRLF & _
"application/ld+json" & @CRLF & _
"application/vnd.ms-excel" & @CRLF & _
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" & @CRLF & _
"multipart/form-data" & @CRLF & _
""
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